jupyter / colaboratory

[deprecated] Jupyter CoLaboratory, goto google colab now
https://colab.research.google.com
BSD 3-Clause "New" or "Revised" License
740 stars 111 forks source link

from colabtools import js broken in Chrome App #90

Closed kayur closed 7 years ago

kayur commented 10 years ago

Throws an error.

marksandler2 commented 10 years ago

Meta comment: please try to be more specific and include any/all logs you can collect. THis might save a lot of time other people who will read this entry.

I think Kester looked into this problem in other context. Something about JSONEncoder not being present in json for unknown reasons. We should find out why it is not available in pnacl version of python. Maybe we can just inject it.


AttributeError Traceback (most recent call last)

in () ----> 1 from colabtools import js /usr/lib/python2.7/site-packages/colabtools/js.py in () 246 247 --> 248 class JsonEncoder(json.JSONEncoder): 249 """Provides json enconding for Js objects.""" 250 AttributeError: 'module' object has no attribute 'JSONEncoder' On Tue, Aug 12, 2014 at 1:17 PM, Kayur Patel notifications@github.com wrote: > Throws an error. > > — > Reply to this email directly or view it on GitHub > https://github.com/jupyter/colaboratory/issues/90.
KesterTong commented 10 years ago

Agreed on @marksandler2's point, it would be very helpful for the developers and others if bug reports are as informative as possible, especially since non-developers may come here to report bugs and see if their bug is already reported.

The error is due to json.JSONDecoder not being there in PNaCl. @marksandler2, tracking down PNaCl issues can be complex. Would it be possible to use json.loads in place of json.JSONDecoder.decode in the meantime?

marksandler2 commented 10 years ago

as far i know we need custom encoder because for whatever reason, i can't provide my serialization routines for custom classes. Unlesss you have a good idea how to serialize custom classes without custom encoder.

On Wed, Aug 13, 2014 at 4:21 PM, KesterTong notifications@github.com wrote:

Agreed on @marksandler2 https://github.com/marksandler2's point, it would be very helpful for the developers and others if bug reports are as informative as possible, especially since non-developers may come here to report bugs and see if their bug is already reported.

The error is due to json.JSONDecoder not being there in colabtools. @marksandler2 https://github.com/marksandler2, tracking down PNaCl issues can be complex. Would it be possible to use json.loads in place of json.JSONDecoder.decode in the meantime?

— Reply to this email directly or view it on GitHub https://github.com/jupyter/colaboratory/issues/90#issuecomment-52125126.

matthewturk commented 10 years ago

Any reason we can't add it to the build? I'm happy to give it a try. On Aug 13, 2014 6:37 PM, "marksandler2" notifications@github.com wrote:

as far i know we need custom encoder because for whatever reason, i can't provide my serialization routines for custom classes. Unlesss you have a good idea how to serialize custom classes without custom encoder.

On Wed, Aug 13, 2014 at 4:21 PM, KesterTong notifications@github.com wrote:

Agreed on @marksandler2 https://github.com/marksandler2's point, it would be very helpful for the developers and others if bug reports are as informative as possible, especially since non-developers may come here to report bugs and see if their bug is already reported.

The error is due to json.JSONDecoder not being there in colabtools. @marksandler2 https://github.com/marksandler2, tracking down PNaCl issues can be complex. Would it be possible to use json.loads in place of json.JSONDecoder.decode in the meantime?

— Reply to this email directly or view it on GitHub https://github.com/jupyter/colaboratory/issues/90#issuecomment-52125126.

— Reply to this email directly or view it on GitHub https://github.com/jupyter/colaboratory/issues/90#issuecomment-52126359.

KesterTong commented 10 years ago

@MatthewTurk, that would be really great. It seemed like a standard part of Python 2.7 so I'm not sure why it isn't there now, but there seems to be a huge number of places in the build process where a build in module might get affected.

@marksandler2, I didn't realize you used a custom encoder.

matthewturk commented 10 years ago

Oh! If it's a standard part, then it probably just has to be enabled. Tomorrow during the hangout, let's investigate.

On Wed, Aug 13, 2014 at 6:48 PM, KesterTong notifications@github.com wrote:

@MatthewTurk https://github.com/MatthewTurk, that would be really great. It seemed like a standard part of Python 2.7 so I'm not sure why it isn't there now, but there seems to be a huge number of places in the build process where a build in module might get affected.

@marksandler2 https://github.com/marksandler2, I didn't realize you used a custom encoder.

— Reply to this email directly or view it on GitHub https://github.com/jupyter/colaboratory/issues/90#issuecomment-52127213.

KesterTong commented 10 years ago

@MatthewTurk is working on this now, @MatthewTurk can you close this issue once the update has propagated to the github repo (i.e. when the pnacl binary version in this repo points to a version that contains the updated json module?)

rgbkrk commented 7 years ago

This version of colaboratory is no longer supported, please switch to https://colab.research.google.com.