Skip to content

to_msgpack throws "PackValueError: recursion limit exceeded." for unsupported objects. #9103

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

Closed
filmor opened this issue Dec 18, 2014 · 2 comments
Labels
Bug Compat pandas objects compatability with Numpy or Python functions

Comments

@filmor
Copy link
Contributor

filmor commented Dec 18, 2014

The following call fails with a PackValueError: recursion limit exceeded., spamming the console with references to pandas.msgpack.Packer._pack lines 3295 and 2391:

df = pd.DataFrame([0], index=[datetime.time(1, 2, 3)])
df.to_msgpack()

This also happens for other unsupported data like a custom object class A: pass; A() instead of datetime.time. In both cases I'd expect the function to immediately stop processing when it encounters an unsupported object (or try to pickle like to_hdf does). Also, an index of datetime.time can be produced directly from a pd.DateTimeIndex, so it would be good to at least special-case this.

@jreback jreback added Bug Compat pandas objects compatability with Numpy or Python functions Msgpack labels Dec 18, 2014
@jreback jreback added this to the 0.16.0 milestone Dec 18, 2014
@jreback
Copy link
Contributor

jreback commented Dec 18, 2014

pull-requests welcome to handle this.

@jreback jreback modified the milestones: 0.16.0, Next Major Release Mar 6, 2015
@simonjayhawkins
Copy link
Member

msgpack is deprecated #30112

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Compat pandas objects compatability with Numpy or Python functions
Projects
None yet
Development

No branches or pull requests

3 participants