Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segmentation fault while creating dataframe from list of mixed-type rows #25075

Closed
selik opened this issue Feb 1, 2019 · 3 comments

Comments

@selik
Copy link
Contributor

commented Feb 1, 2019

In [2]: pd.DataFrame([
   ...:     [1, 2],
   ...:     (3, 4)
   ...: ])
Segmentation fault: 11

I'd like to see a TypeError here, instead of a segfault.

INSTALLED VERSIONS

commit: None
python: 3.7.2.final.0
python-bits: 64
OS: Darwin
OS-release: 18.2.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: en_US.UTF-8

pandas: 0.24.0
pytest: None
pip: 19.0.1
setuptools: 40.7.1
Cython: None
numpy: 1.15.4
scipy: 1.2.0
pyarrow: None
xarray: None
IPython: 7.2.0
sphinx: None
patsy: None
dateutil: 2.7.5
pytz: 2018.9
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 3.0.2
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml.etree: None
bs4: None
html5lib: None
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.10
s3fs: None
fastparquet: None
pandas_gbq: None
pandas_datareader: None
gcsfs: None

@jschendel

This comment has been minimized.

Copy link
Member

commented Feb 1, 2019

Thanks! I can confirm this behavior on master:

In [1]: import pandas as pd; pd.__version__                                                                                                      
Out[1]: '0.25.0.dev0+37.g5c40cf2'

In [2]: pd.DataFrame([[1, 2], (3, 4)])                                                                                                           
Segmentation fault

Looks like a regression, as this previously raised a TypeError in 0.23.4:

In [1]: import pandas as pd; pd.__version__
Out[1]: '0.23.4'

In [2]: pd.DataFrame([[1, 2], (3, 4)])
---------------------------------------------------------------------------
TypeError: Expected list, got tuple

@jschendel jschendel added the Regression label Feb 1, 2019

@jschendel jschendel added this to the Contributions Welcome milestone Feb 1, 2019

@Vibhu-Agarwal

This comment has been minimized.

Copy link
Contributor

commented Feb 2, 2019

Seems a bit odd that the error shows no traceback of function calls because whenever there is an exception, python always show the traceback of exception.
This behavior could be because it's directly printed somewhere after catching the exception OR there's some error in API Calling to CPython Code.

@Vibhu-Agarwal

This comment has been minimized.

Copy link
Contributor

commented Feb 2, 2019

I would like to work on this issue and solve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.