kuanb / peartree

peartree: A library for converting transit data into a directed graph for sketch network analysis.
MIT License
201 stars 23 forks source link

Error creating notebook environment #37

Closed yiyange closed 6 years ago

yiyange commented 6 years ago
Yiyans-MacBook-Pro:peartree yiyange$ docker-compose rm -f notebook
Going to remove peartree_notebook_1
Removing peartree_notebook_1 ... done
Yiyans-MacBook-Pro:peartree yiyange$ docker-compose up notebook
Creating peartree_notebook_1 ... done
Attaching to peartree_notebook_1
notebook_1  | [I 00:13:15.446 NotebookApp] Writing notebook server cookie secret to /root/.local/share/jupyter/runtime/notebook_cookie_secret
notebook_1  | [I 00:13:15.786 NotebookApp] Serving notebooks from local directory: /code/notebooks
notebook_1  | [I 00:13:15.786 NotebookApp] 0 active kernels
notebook_1  | [I 00:13:15.787 NotebookApp] The Jupyter Notebook is running at:
notebook_1  | [I 00:13:15.787 NotebookApp] http://0.0.0.0:9797/?token=3aa6b2508ec69da152ab7b3352b682d909d01f9e5dde34cb
notebook_1  | [I 00:13:15.787 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
notebook_1  | [C 00:13:15.788 NotebookApp] 
notebook_1  |     
notebook_1  |     Copy/paste this URL into your browser when you connect for the first time,
notebook_1  |     to login with a token:
notebook_1  |         http://0.0.0.0:9797/?token=3aa6b2508ec69da152ab7b3352b682d909d01f9e5dde34cb
notebook_1  | [I 00:13:24.220 NotebookApp] 302 GET /?token=3aa6b2508ec69da152ab7b3352b682d909d01f9e5dde34cb (172.18.0.1) 0.61ms
notebook_1  | [I 00:13:28.547 NotebookApp] Writing notebook-signing key to /root/.local/share/jupyter/notebook_secret
notebook_1  | [W 00:13:28.548 NotebookApp] Notebook Untitled.ipynb is not trusted
notebook_1  | [E 00:13:28.650 NotebookApp] Uncaught exception POST /api/sessions (172.18.0.1)
notebook_1  |     HTTPServerRequest(protocol='http', host='0.0.0.0:9797', method='POST', uri='/api/sessions', version='HTTP/1.1', remote_ip='172.18.0.1')
notebook_1  |     Traceback (most recent call last):
notebook_1  |       File "/usr/local/lib/python3.6/site-packages/traitlets/traitlets.py", line 528, in get
notebook_1  |         value = obj._trait_values[self.name]
notebook_1  |     KeyError: 'loop'
notebook_1  |     
notebook_1  |     During handling of the above exception, another exception occurred:
notebook_1  |     
notebook_1  |     Traceback (most recent call last):
notebook_1  |       File "/usr/local/lib/python3.6/site-packages/tornado/web.py", line 1543, in _execute
notebook_1  |         result = yield result
notebook_1  |       File "/usr/local/lib/python3.6/site-packages/tornado/gen.py", line 1099, in run
notebook_1  |         value = future.result()
notebook_1  |       File "/usr/local/lib/python3.6/site-packages/tornado/gen.py", line 1107, in run
notebook_1  |         yielded = self.gen.throw(*exc_info)
notebook_1  |       File "/usr/local/lib/python3.6/site-packages/notebook/services/sessions/handlers.py", line 73, in post
notebook_1  |         type=mtype))
notebook_1  |       File "/usr/local/lib/python3.6/site-packages/tornado/gen.py", line 1099, in run
notebook_1  |         value = future.result()
notebook_1  |       File "/usr/local/lib/python3.6/site-packages/tornado/gen.py", line 1107, in run
notebook_1  |         yielded = self.gen.throw(*exc_info)
notebook_1  |       File "/usr/local/lib/python3.6/site-packages/notebook/services/sessions/sessionmanager.py", line 79, in create_session
notebook_1  |         kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
notebook_1  |       File "/usr/local/lib/python3.6/site-packages/tornado/gen.py", line 1099, in run
notebook_1  |         value = future.result()
notebook_1  |       File "/usr/local/lib/python3.6/site-packages/tornado/gen.py", line 1107, in run
notebook_1  |         yielded = self.gen.throw(*exc_info)
notebook_1  |       File "/usr/local/lib/python3.6/site-packages/notebook/services/sessions/sessionmanager.py", line 92, in start_kernel_for_session
notebook_1  |         self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
notebook_1  |       File "/usr/local/lib/python3.6/site-packages/tornado/gen.py", line 1099, in run
notebook_1  |         value = future.result()
notebook_1  |       File "/usr/local/lib/python3.6/site-packages/tornado/gen.py", line 315, in wrapper
notebook_1  |         yielded = next(result)
notebook_1  |       File "/usr/local/lib/python3.6/site-packages/notebook/services/kernels/kernelmanager.py", line 148, in start_kernel
notebook_1  |         super(MappingKernelManager, self).start_kernel(**kwargs)
notebook_1  |       File "/usr/local/lib/python3.6/site-packages/jupyter_client/multikernelmanager.py", line 110, in start_kernel
notebook_1  |         km.start_kernel(**kwargs)
notebook_1  |       File "/usr/local/lib/python3.6/site-packages/jupyter_client/manager.py", line 258, in start_kernel
notebook_1  |         self.start_restarter()
notebook_1  |       File "/usr/local/lib/python3.6/site-packages/jupyter_client/ioloop/manager.py", line 49, in start_restarter
notebook_1  |         kernel_manager=self, loop=self.loop,
notebook_1  |       File "/usr/local/lib/python3.6/site-packages/traitlets/traitlets.py", line 556, in __get__
notebook_1  |         return self.get(obj, cls)
notebook_1  |       File "/usr/local/lib/python3.6/site-packages/traitlets/traitlets.py", line 535, in get
notebook_1  |         value = self._validate(obj, dynamic_default())
notebook_1  |       File "/usr/local/lib/python3.6/site-packages/traitlets/traitlets.py", line 591, in _validate
notebook_1  |         value = self.validate(obj, value)
notebook_1  |       File "/usr/local/lib/python3.6/site-packages/traitlets/traitlets.py", line 1677, in validate
notebook_1  |         self.error(obj, value)
notebook_1  |       File "/usr/local/lib/python3.6/site-packages/traitlets/traitlets.py", line 1524, in error
notebook_1  |         raise TraitError(e)
notebook_1  |     traitlets.traitlets.TraitError: The 'loop' trait of an IOLoopKernelManager instance must be a ZMQIOLoop, but a value of class 'tornado.platform.asyncio.AsyncIOMainLoop' (i.e. <tornado.platform.asyncio.AsyncIOMainLoop object at 0x7f29c235b588>) was specified.
notebook_1  | [W 00:13:28.653 NotebookApp] Unhandled error
notebook_1  | [E 00:13:28.654 NotebookApp] {
notebook_1  |       "Host": "0.0.0.0:9797",
notebook_1  |       "Connection": "keep-alive",
notebook_1  |       "Content-Length": "91",
notebook_1  |       "Accept": "application/json, text/javascript, */*; q=0.01",
notebook_1  |       "Origin": "http://0.0.0.0:9797",
notebook_1  |       "X-Requested-With": "XMLHttpRequest",
notebook_1  |       "X-Xsrftoken": "2|c66c5c41|5dbfb5d93602d6318b9d1b2c3abc9611|1520899616",
notebook_1  |       "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.167 Safari/537.36",
notebook_1  |       "Content-Type": "application/json",
notebook_1  |       "Referer": "http://0.0.0.0:9797/notebooks/Untitled.ipynb",
notebook_1  |       "Accept-Encoding": "gzip, deflate",
notebook_1  |       "Accept-Language": "en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7,zh-TW;q=0.6,fr;q=0.5",
notebook_1  |       "Cookie": "_xsrf=2|c66c5c41|5dbfb5d93602d6318b9d1b2c3abc9611|1520899616; username-0-0-0-0-9797=\"2|1:0|10:1520900004|21:username-0-0-0-0-9797|44:OGQ0NjllNThkNzEwNGM4Mjg4MmYxMzgxNTRmY2E0MDI=|730c7a781d68efd7a5c42cac5ef6c7d188d870e50925e4c5456ac652ef6a800e\""
kuanb commented 6 years ago

Can confirm this is happening.

On fresh notebook container: image

kuanb commented 6 years ago

Thanks @yiyange, looks like it was just an issue with the Jupter notebook libraries having been updated. PR out to deal with this here: https://github.com/kuanb/peartree/pull/38