jupyter / jupyter-drive

Google drive for jupyter notebooks
BSD 2-Clause "Simplified" License
418 stars 78 forks source link

Notebook failed to load #119

Open code-of-kpp opened 9 years ago

code-of-kpp commented 9 years ago

I've got master of everything and here's what I get when I'm trying to open or create a notebook:

On screen:

Notebook failed to load
    The error was:
    TypeError: Cannot read property 'language_info' of undefined
    See the error console for details.

In server logs:

[W 12:45:44.344 NotebookApp] 404 GET /nbextensions/gdrive/drive-contents.js.map (172.17.42.1) 0.51ms referer=None
[W 12:45:45.963 NotebookApp] 404 GET /nbextensions/gdrive/notebook_model.js.map (172.17.42.1) 0.51ms referer=None
[W 12:45:46.318 NotebookApp] 404 GET /nbextensions/gdrive/driveutils.js.map (172.17.42.1) 0.51ms referer=None
[W 12:45:46.332 NotebookApp] 404 GET /nbextensions/gdrive/gapiutils.js.map (172.17.42.1) 0.51ms referer=None
[W 12:45:48.286 NotebookApp] 404 GET /nbextensions/gdrive/pickerutils.js.map (172.17.42.1) 0.51ms referer=None

In browser console:

    main.min.js?v=5566f41afe61754de29348272d979319:23
Default extension for cell metadata editing loaded.
    main.min.js?v=5566f41afe61754de29348272d979319:23
Raw Cell Format toolbar preset loaded.
    main.min.js?v=5566f41afe61754de29348272d979319:23
Slideshow extension for metadata editing loaded.
    main.min.js?v=5566f41afe61754de29348272d979319:3
XHR finished loading: GET "http://127.0.0.1:8000/api/config/common?_=1434976748857".rt.ajaxTransport.rt.support.cors.e.crossDomain.send @ main.min.js?v=5566f41afe61754de29348272d979319:3rt.extend.ajax @ main.min.js?v=5566f41afe61754de29348272d979319:3H @ main.min.js?v=5566f41afe61754de29348272d979319:9H @ main.min.js?v=5566f41afe61754de29348272d979319:9n.load @ main.min.js?v=5566f41afe61754de29348272d979319:12(anonymous function) @ main.min.js?v=5566f41afe61754de29348272d979319:28context.execCb @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:1670Module.check @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:874(anonymous function) @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:1124(anonymous function) @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:132(anonymous function) @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:1174each @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:57Module.emit @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:1173Module.check @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:925Module.enable @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:1161Module.init @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:782callGetModule @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:1188context.completeLoad @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:1584context.onScriptLoad @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:1691
    main.min.js?v=5566f41afe61754de29348272d979319:3
XHR finished loading: GET "http://127.0.0.1:8000/api/config/notebook?_=1434976748856".rt.ajaxTransport.rt.support.cors.e.crossDomain.send @ main.min.js?v=5566f41afe61754de29348272d979319:3rt.extend.ajax @ main.min.js?v=5566f41afe61754de29348272d979319:3H @ main.min.js?v=5566f41afe61754de29348272d979319:9H @ main.min.js?v=5566f41afe61754de29348272d979319:9n.load @ main.min.js?v=5566f41afe61754de29348272d979319:12(anonymous function) @ main.min.js?v=5566f41afe61754de29348272d979319:28context.execCb @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:1670Module.check @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:874(anonymous function) @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:1124(anonymous function) @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:132(anonymous function) @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:1174each @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:57Module.emit @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:1173Module.check @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:925Module.enable @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:1161Module.init @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:782callGetModule @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:1188context.completeLoad @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:1584context.onScriptLoad @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:1691
    main.min.js?v=5566f41afe61754de29348272d979319:3
XHR finished loading: GET "http://127.0.0.1:8000/api/kernelspecs".rt.ajaxTransport.rt.support.cors.e.crossDomain.send @ main.min.js?v=5566f41afe61754de29348272d979319:3rt.extend.ajax @ main.min.js?v=5566f41afe61754de29348272d979319:3H @ main.min.js?v=5566f41afe61754de29348272d979319:9H @ main.min.js?v=5566f41afe61754de29348272d979319:9o.request_kernelspecs @ main.min.js?v=5566f41afe61754de29348272d979319:27o @ main.min.js?v=5566f41afe61754de29348272d979319:27(anonymous function) @ main.min.js?v=5566f41afe61754de29348272d979319:28context.execCb @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:1670Module.check @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:874(anonymous function) @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:1124(anonymous function) @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:132(anonymous function) @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:1174each @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:57Module.emit @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:1173Module.check @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:925Module.enable @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:1161Module.init @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:782callGetModule @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:1188context.completeLoad @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:1584context.onScriptLoad @ require.js?v=4c293cc603dabc2eb7b3fd6e2e271ffa:1691
    cb=gapi.loaded_0:99
XHR finished loading: GET "https://content.googleapis.com/discovery/v1/apis/drive/v2/rest?fields=rootUrl%2CservicePath%2Cresources%2Cparameters%2Cmethods&pp=0".zu @ cb=gapi.loaded_0:99n @ cb=gapi.loaded_0:99Cu @ cb=gapi.loaded_0:99(anonymous function) @ cb=gapi.loaded_0:100g @ cb=gapi.loaded_0:56c @ cb=gapi.loaded_0:47
    cb=gapi.loaded_0:99 
XHR finished loading: GET "https://content.googleapis.com/drive/v2/files?q=title%20%3D%20%27Untitled0.ipynb%27%20and%20trashed%20%3D%20false%20%20and%20%27root%27%20in%20parents".zu @ cb=gapi.loaded_0:99n @ cb=gapi.loaded_0:99Cu @ cb=gapi.loaded_0:99(anonymous function) @ cb=gapi.loaded_0:100g @ cb=gapi.loaded_0:56c @ cb=gapi.loaded_0:47
    cb=gapi.loaded_0:99 
XHR finished loading: GET "https://content.googleapis.com/drive/v2/about".zu @ cb=gapi.loaded_0:99n @ cb=gapi.loaded_0:99Cu @ cb=gapi.loaded_0:99(anonymous function) @ cb=gapi.loaded_0:100g @ cb=gapi.loaded_0:56c @ cb=gapi.loaded_0:47
XHR finished loading: GET "https://doc-0o-94-docs.googleusercontent.com/docs/securesc/efp2reo7n1u0094i…922/0B_PdiYpBa5QmSldGb0w2RmhHakE?h=08712578529564101418&e=download&gd=true".
    main.min.js?v=5566f41afe61754de29348272d979319:24
Notebook failed to load from JSON: TypeError: Cannot read property 'language_info' of undefined
    at y.fromJSON (http://127.0.0.1:8000/static/notebook/js/main.min.js?v=5566f41afe61754de29348272d979319:24:10507)
    at y.load_notebook_success (http://127.0.0.1:8000/static/notebook/js/main.min.js?v=5566f41afe61754de29348272d979319:24:15947)
    at rt.extend.proxy.rt.isFunction.r (http://127.0.0.1:8000/static/notebook/js/main.min.js?v=5566f41afe61754de29348272d979319:1:16270)
    main.min.js?v=5566f41afe61754de29348272d979319:24
Uncaught (in promise) TypeError: Cannot read property 'orig_nbformat' of undefined
    at y.load_notebook_success (http://127.0.0.1:8000/static/notebook/js/main.min.js?v=5566f41afe61754de29348272d979319:24:16914)
    at rt.extend.proxy.rt.isFunction.r (http://127.0.0.1:8000/static/notebook/js/main.min.js?v=5566f41afe61754de29348272d979319:1:16270)

Hard refresh, relogin and cache cleaning aren't helping.

bmyerz commented 9 years ago

+1 image

in ipython

[W 16:44:06.146 NotebookApp] 404 GET /nbextensions/gdrive/drive-contents.js.map (::1) 6.42ms referer=None
[W 16:44:21.797 NotebookApp] 404 GET /nbextensions/gdrive/drive-contents.js.map (::1) 1.78ms referer=None
[W 16:44:22.014 NotebookApp] 404 GET /nbextensions/gdrive/gapiutils.js.map (::1) 3.94ms referer=None
[W 16:44:22.019 NotebookApp] 404 GET /nbextensions/gdrive/driveutils.js.map (::1) 2.67ms referer=None
[W 16:44:22.023 NotebookApp] 404 GET /nbextensions/gdrive/notebook_model.js.map (::1) 2.04ms referer=None
[W 16:44:22.301 NotebookApp] 404 GET /nbextensions/gdrive/pickerutils.js.map (::1) 1.79ms referer=None
[W 16:44:22.420 NotebookApp] 404 GET /static/components/underscore/underscore-min.map (::1) 1.29ms referer=None
[W 16:44:23.001 NotebookApp] 404 GET /static/components/backbone/backbone-min.map (::1) 1.84ms referer=None
[W 16:46:02.589 NotebookApp] 404 GET /static/components/underscore/underscore-min.map (::1) 1.83ms referer=None
[W 16:46:02.591 NotebookApp] 404 GET /nbextensions/gdrive/pickerutils.js.map (::1) 1.27ms referer=None
[W 16:46:02.599 NotebookApp] 404 GET /nbextensions/gdrive/gapiutils.js.map (::1) 1.52ms referer=None
[W 16:46:02.605 NotebookApp] 404 GET /nbextensions/gdrive/driveutils.js.map (::1) 1.49ms referer=None
[W 16:46:02.620 NotebookApp] 404 GET /static/components/backbone/backbone-min.map (::1) 1.11ms referer=None
[W 16:46:02.623 NotebookApp] 404 GET /nbextensions/gdrive/notebook_model.js.map (::1) 1.39ms referer=None
[W 16:46:18.431 NotebookApp] 404 GET /nbextensions/gdrive/drive-contents.js.map (::1) 5.36ms referer=None
[W 16:46:18.439 NotebookApp] 404 GET /nbextensions/gdrive/pickerutils.js.map (::1) 1.27ms referer=None
[W 16:46:18.441 NotebookApp] 404 GET /static/components/underscore/underscore-min.map (::1) 1.38ms referer=None
[W 16:46:18.443 NotebookApp] 404 GET /nbextensions/gdrive/notebook_model.js.map (::1) 1.28ms referer=None
[W 16:46:18.445 NotebookApp] 404 GET /nbextensions/gdrive/driveutils.js.map (::1) 1.37ms referer=None
[W 16:46:18.451 NotebookApp] 404 GET /nbextensions/gdrive/gapiutils.js.map (::1) 1.36ms referer=None
[W 16:46:18.470 NotebookApp] 404 GET /static/components/backbone/backbone-min.map (::1) 1.87ms referer=None
Uncaught (in promise) TypeError: Cannot read property 'orig_nbformat' of undefined
    at Notebook.load_notebook_success (http://localhost:8888/static/notebook/js/notebook.js?v=20150707163928:2205:45)
    at x.extend.proxy.x.isFunction.i (http://localhost:8888/static/components/jquery/jquery.min.js?v=20150707163928:4:5488)Notebook.load_notebook_success @ :8888/static/notebook/js/notebook.js?v=20150707163928:2205x.extend.proxy.x.isFunction.i @ :8888/static/components/jq
TiesdeKok commented 9 years ago

+1

On screen:

The error was:
TypeError: Cannot read property 'language_info' of undefined
See the error console for details.

In console:

[E 10:10:23.176 NotebookApp] Unhandled error in API request
    Traceback (most recent call last):
      File "C:\Users\Username\AppData\Local\Enthought\Canopy\User\lib\site-packages\IPython\html\base\handlers.py", line 441, in wrapper
        result = yield gen.maybe_future(method(self, *args, **kwargs))
      File "C:\Users\Username\AppData\Local\Enthought\Canopy\User\lib\site-packages\IPython\html\services\config\handlers.py", line 21, in get
        self.finish(json.dumps(self.config_manager.get(section_name)))
      File "C:\Users\Username\AppData\Local\Enthought\Canopy\User\lib\site-packages\IPython\config\manager.py", line 74, in get
        return json.load(f)
      File "C:\Users\Username\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.2.2785.win-x86_64\lib\json\__init__.py", line 290, in load
        **kw)
      File "C:\Users\Username\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.2.2785.win-x86_64\lib\json\__init__.py", line 338, in loads
        return _default_decoder.decode(s)
      File "C:\Users\Username\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.2.2785.win-x86_64\lib\json\decoder.py", line 365, in decode
        obj, end = self.raw_decode(s, idx=_w(s, 0).end())
      File "C:\Users\Username\AppData\Local\Enthought\Canopy\App\appdata\canopy-1.5.2.2785.win-x86_64\lib\json\decoder.py", line 383, in raw_decode
        raise ValueError("No JSON object could be decoded")
    ValueError: No JSON object could be decoded
[E 10:10:23.177 NotebookApp] {
      "Accept-Language": "en-US,en;q=0.8,nl;q=0.6",
      "Accept-Encoding": "gzip, deflate, sdch",
      "Connection": "keep-alive",
      "Accept": "application/json, text/javascript, */*; q=0.01",
      "User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.132 Safari/537.36",
      "Host": "localhost:8888",
      "Referer": "http://localhost:8888/notebooks/gdrive/Untitled0.ipynb?kernel_name=python2",
      "X-Requested-With": "XMLHttpRequest"
    }
[E 10:10:23.177 NotebookApp] 500 GET /api/config/notebook?_=1436861422951 (::1) 2.00ms referer=http://localhost:8888/notebooks/gdrive/Untitled0.ipynb?kernel_name=python2

Everything works fine when using the local drive.

Ps. great talks at SciPy 2015!

Carreau commented 9 years ago

Hi all,

I finally get a change to look at that. it's a weird combinaison of multiple factors. I achived to reproduced it. It did not affected me because it was continuously upgraded while I was working on this.

you can try https://github.com/jupyter/jupyter-drive/pull/124, that I'll cleanup later and should allow you to open both corrupted, and non-corrupted notebook on google drive.

bmyerz commented 9 years ago

With the latest jupyter-drive I appear to get the same error as above when creating a new notebook