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
NaN in object_info_reply JSON causes parse error #2187
Comments
Well that's awkward. The error, of course, comes in writing out the call specification for
Apparently there is no NaN or +/-Inf in the JSON spec. There some stack overflow questions about this, like Python: sending NaN in JSON. I'm not sure what an appropriate resolution for this issue is yet. |
Well, reading the stackoverflow it looks like browsers support it so maybe it is fine. |
stdlib json has an We already have a json_clean method (IPython.utils.jsonutil), which is where we handle non-jsonable objects, so that's where the fix should be. |
Closed by #2194. |
these values are not json-compliant closes #2187
When I send
object_info_request
forpandas.DataFrame.reindex
, I've got the following JSON reply.Please look the list at
content.defaults
. It containsNaN
. This causes parse error in Emacs JSON parser I am using for my Emacs Notebook Client tkf/emacs-ipython-notebook#38.You can check that indeed it's not a valid JSON using http://jsonlint.com/:
The text was updated successfully, but these errors were encountered: