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

to_json segfaults with timezone-aware datetimes #11473

Closed
davidszotten opened this issue Oct 29, 2015 · 4 comments
Closed

to_json segfaults with timezone-aware datetimes #11473

davidszotten opened this issue Oct 29, 2015 · 4 comments
Labels
Enhancement IO JSON read_json, to_json, json_normalize Timeseries Timezones Timezone data dtype
Milestone

Comments

@davidszotten
Copy link

>>> import pandas as pd; import pytz; import datetime; faulthandler
>>> faulthandler.enable()
>>> pd.DataFrame.from_records([{'ts': datetime.datetime(2015,1,1, tzinfo=pytz.UTC)}]).to_json()

Fatal Python error: Segmentation fault

Current thread 0x00007fff73afd300 (most recent call first):
  File "<snip>lib/python2.7/site-packages/pandas/io/json.py", line 78 in write
  File "<snip>lib/python2.7/site-packages/pandas/io/json.py", line 35 in to_json
  File "<snip>lib/python2.7/site-packages/pandas/core/generic.py", line 893 in to_json
  File "<stdin>", line 1 in <module>
Segmentation fault: 11
@jreback
Copy link
Contributor

jreback commented Oct 29, 2015

similarly to #10778 it is waiting for an implementation

@jreback jreback added Enhancement Timeseries IO JSON read_json, to_json, json_normalize Timezones Timezone data dtype labels Oct 29, 2015
@jreback jreback added this to the Next Major Release milestone Oct 29, 2015
@kawochen
Copy link
Contributor

should there be a validation somewhere so that it doesn't segfault even with unsupported types?

@jreback
Copy link
Contributor

jreback commented Oct 29, 2015

@kawochen IIRC their is supposed to be something that does exactly that (and use the defautl handler in that case). maybe its not working (or borking on this check)

@jreback
Copy link
Contributor

jreback commented Oct 29, 2015

cc @Komnomnomnom

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement IO JSON read_json, to_json, json_normalize Timeseries Timezones Timezone data dtype
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants