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 · Fixed by #25089
Closed

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

selik opened this issue Feb 1, 2019 · 3 comments · Fixed by #25089
Labels
Bug Regression Functionality that used to work in a prior pandas version Reshaping Concat, Merge/Join, Stack/Unstack, Explode Segfault Non-Recoverable Error
Milestone

Comments

@selik
Copy link
Contributor

selik 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
Copy link
Member

jschendel 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 Functionality that used to work in a prior pandas version label Feb 1, 2019
@jschendel jschendel added this to the Contributions Welcome milestone Feb 1, 2019
@Vibhu-Agarwal
Copy link
Contributor

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
Copy link
Contributor

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

@jreback jreback added the Reshaping Concat, Merge/Join, Stack/Unstack, Explode label Feb 2, 2019
@jreback jreback modified the milestones: Contributions Welcome, 0.24.2 Feb 2, 2019
@jreback jreback added the Bug label Feb 2, 2019
@jbrockmendel jbrockmendel added the Segfault Non-Recoverable Error label Feb 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Regression Functionality that used to work in a prior pandas version Reshaping Concat, Merge/Join, Stack/Unstack, Explode Segfault Non-Recoverable Error
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants