-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: Series.unique segfaults on invalid unicode #34550
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
Comments
Hey, thanks for your report. This works for me on master. Output:
Which commit did you test on? I pulled before executing this. |
Oh sorry, it seems I wasn't clear enough ("Not present anymore, might be fixed by accident, but no could not find a PR that did that."). I've meant that it currently is fixed on master, but I wasn't sure if it was fixed by some PR just "by accident" (i.e. some refactoring / bugfix that was meant to address something else) or if it is even present on master (SEGFAULTs can be somewhat tricky due to their dependency on memory layout and certain runtime aspects). |
Ah, I read over your note (BTW, feel free to edit the top of the issue template, as I did now, it's mostly to remind people to do that when they are writing the issue, but you don't necessarily need to keep it once written. That can make your issue easier to read) But indeed, I suppose it was kind of by accident (it was the same unicode string, but causing an error in another context, not a segfault), so at least we want to add tests for this case. |
@jorisvandenbossche @marco-neumann-jdas @phofl I'm happy to do a PR with these tests if nobody is working on this already! |
I would like to work on this issue as part of the PyData Amsterdam coding sprint. So far I have confirmed that the released version of Pandas has the bug, and master is fixed. AFAIU, it needs a regression test. The issue was, for the specific payload of invalid unicode data calling So it should be added in the same place where |
Not present anymore, might be fixed by accident, but no could not find a PR that did that.
Code Sample, a copy-pastable example
Problem description
Expected Output
Not crashing.
Output of
pd.show_versions()
INSTALLED VERSIONS
commit : None
python : 3.6.6.final.0
python-bits : 64
OS : Linux
OS-release : 5.4.0-33-generic
machine : x86_64
processor :
byteorder : little
LC_ALL : en_US.UTF-8
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 1.0.4
numpy : 1.18.1
pytz : 2019.3
dateutil : 2.8.1
pip : 19.2.3
setuptools : 41.2.0
Cython : None
pytest : 5.4.1
hypothesis : None
sphinx : 3.0.3
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.2
IPython : 7.15.0
pandas_datareader: None
bs4 : None
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 0.15.1
pytables : None
pytest : 5.4.1
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
xlsxwriter : None
numba : None
The text was updated successfully, but these errors were encountered: