jupyterlab/jupyterlab-github

File Load Error when trying to open a notebook

beenje opened this issue · 4 comments

When I try to open a notebook using the extension, I always get the error:

File Load Error for ....
undefined is not an object (evaluating 'value.cells')

If I download the file locally, I have no issue opening it.
I'm using (installed from conda-forge):

  - jupyter_client=5.2.3=py_1
  - jupyter_core=4.4.0=py_0
  - jupyterlab=0.35.4=py36_0
  - jupyterlab_server=0.2.0=py_0
  - notebook=5.7.2=py36_1000
  - pip:
    - jupyterlab-github==0.7.0

lab extension:
@jupyterlab/github v0.10.0  enabled  OK

file_load_error

Does this happen for all notebooks, or a select few? Some (very) old notebooks that are hosted on GitHub use an older version of the notebook format that is not supported in JupyterLab. That appears to be the case with the one in your screenshot. You can verify this by opening it with the text editor: it has a "worksheets" field instead of a "cells" field.

You are correct, the issue is only with notebooks that have a "worksheets" field.
I was surprised because if I download the same notebook and open it from the local filesystem in JupyterLab, I have no issue. If I then save it, it's converted to the new format.

Do you know why the file can be opened locally but not using this extension?

I believe that internally the jupyter notebook server is converting from the old format on the fly. Since this extension pulls directly from GitHub (not routing through the server), it does not get the benefit of that conversion. Unfortunate, but I don't see a way around it at the moment.

OK, thanks. I don't think that not being able to open old format is a big issue. It was more by curiosity.
I don't see the need to keep that open.