-
Notifications
You must be signed in to change notification settings - Fork 365
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
Maximum recursion level reached in Python 3 #221
Comments
I'm facing a similar problem |
EDIT: My bad, it wasn't fixing anything (I just ran my test only on a numpy array of I also saw this issue is related to #204 and #164. I guess it could be due to It might be fixed by using the Number Protocol of the python API when checking value type but some people more familiar with python c api might need to confirm. |
Good work! |
Also in python 2, arrays of numpy.float32 fail while float64 is fine: >>> import numpy, ujson
>>> x64=numpy.array([1.0, 2.0])
>>> x32=numpy.array([1.0, 2.0], dtype=numpy.float32)
>>> ujson.dumps(x64)
'[1.0,2.0]'
>>> ujson.dumps(x32)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OverflowError: Maximum recursion level reached |
Resolved in 53f85b1 by no longer trying to serialize these. |
NumPy int64 has been fixed with caiyunapp/ultrajson with calling NumPy's header in C. |
ujson fails with maximum level reached for numpy array of ints in Python 3. It's probably not problem of ujson, but anyway I think ujson should end with better message. Something like „xy is not serializable because it fails with“ so developer know what to look for.
The text was updated successfully, but these errors were encountered: