Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

JupyterLab has no kernel running through JupyterHub #62

Open
nielsenmarkus11 opened this issue Jun 27, 2018 · 6 comments
Open

JupyterLab has no kernel running through JupyterHub #62

nielsenmarkus11 opened this issue Jun 27, 2018 · 6 comments

Comments

@nielsenmarkus11
Copy link

nielsenmarkus11 commented Jun 27, 2018

When I try to open a notebook or python kernel I get the following error after waiting some time...

Traceback (most recent call last):
  File "/opt/anaconda/anaconda3/lib/python3.6/site-packages/traitlets/traitlets.py", line 528, in get
    value = obj._trait_values[self.name]
KeyError: 'loop'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/anaconda/anaconda3/lib/python3.6/site-packages/notebook/base/handlers.py", line 516, in wrapper
    if exc_info:
  File "/opt/anaconda/anaconda3/lib/python3.6/site-packages/tornado/gen.py", line 1099, in run
    value = future.result()
  File "/opt/anaconda/anaconda3/lib/python3.6/site-packages/tornado/gen.py", line 1107, in run
    yielded = self.gen.throw(*exc_info)
  File "/opt/anaconda/anaconda3/lib/python3.6/site-packages/notebook/services/sessions/handlers.py", line 75, in post
    msg = ("The '%s' kernel is not available. Please pick another "
  File "/opt/anaconda/anaconda3/lib/python3.6/site-packages/tornado/gen.py", line 1099, in run
    value = future.result()
  File "/opt/anaconda/anaconda3/lib/python3.6/site-packages/tornado/gen.py", line 1107, in run
    yielded = self.gen.throw(*exc_info)
  File "/opt/anaconda/anaconda3/lib/python3.6/site-packages/notebook/services/sessions/sessionmanager.py", line 79, in create_session
    kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
  File "/opt/anaconda/anaconda3/lib/python3.6/site-packages/tornado/gen.py", line 1099, in run
    value = future.result()
  File "/opt/anaconda/anaconda3/lib/python3.6/site-packages/tornado/gen.py", line 1107, in run
    yielded = self.gen.throw(*exc_info)
  File "/opt/anaconda/anaconda3/lib/python3.6/site-packages/notebook/services/sessions/sessionmanager.py", line 92, in start_kernel_for_session
    self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
  File "/opt/anaconda/anaconda3/lib/python3.6/site-packages/tornado/gen.py", line 1099, in run
    value = future.result()
  File "/opt/anaconda/anaconda3/lib/python3.6/site-packages/tornado/gen.py", line 315, in wrapper
    yielded = next(result)
  File "/opt/anaconda/anaconda3/lib/python3.6/site-packages/notebook/services/kernels/kernelmanager.py", line 94, in start_kernel
    """
  File "/opt/anaconda/anaconda3/lib/python3.6/site-packages/jupyter_client/multikernelmanager.py", line 110, in start_kernel
    km.start_kernel(**kwargs)
  File "/opt/anaconda/anaconda3/lib/python3.6/site-packages/jupyter_client/manager.py", line 258, in start_kernel
    self.kernel = self._launch_kernel(kernel_cmd, env=env,
  File "/opt/anaconda/anaconda3/lib/python3.6/site-packages/jupyter_client/ioloop/manager.py", line 49, in start_restarter
    parent=self, log=self.log
  File "/opt/anaconda/anaconda3/lib/python3.6/site-packages/traitlets/traitlets.py", line 556, in __get__
    return self.get(obj, cls)
  File "/opt/anaconda/anaconda3/lib/python3.6/site-packages/traitlets/traitlets.py", line 535, in get
    value = self._validate(obj, dynamic_default())
  File "/opt/anaconda/anaconda3/lib/python3.6/site-packages/traitlets/traitlets.py", line 591, in _validate
    value = self.validate(obj, value)
  File "/opt/anaconda/anaconda3/lib/python3.6/site-packages/traitlets/traitlets.py", line 1677, in validate
    self.error(obj, value)
  File "/opt/anaconda/anaconda3/lib/python3.6/site-packages/traitlets/traitlets.py", line 1524, in error
    raise TraitError(e)
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 0x7f504ec26e48>) was specified.

However when I run jupyter lab locally it connects to the Python 3 kernel instantly. Any idea where I could be going wrong?

@nielsenmarkus11
Copy link
Author

nielsenmarkus11 commented Jun 27, 2018

In an attempt to resolve this I did the following:

sudo conda update anaconda
sudo conda update jupyter
sudo conda update jupyter_client

...but still no luck.

@nielsenmarkus11
Copy link
Author

nielsenmarkus11 commented Jun 28, 2018

I have it working now with an older version of tornado. sudo conda install -c conda-forge tornado=4

tornado                   4.5.3                    py36_0    conda-forge

This is based off of the ipython issue here: ipython/ipyparallel#318

@JWDobken
Copy link

JWDobken commented Jul 4, 2018

Have you tried:

conda install -c conda-forge jupyterhub

at least it works for me. Did you install jupyterhub with the correct conda environment?

@zangjihong
Copy link

I have the same problem. What should I do about it? @nielsenmarkus11 Have you solved it?

@nielsenmarkus11
Copy link
Author

@zangjihong, I was able to get it working by using an older version of tornado. It looks like it may be coming up because of the issue that hasn't been resolved yet with the ipyparallel issue I mentioned above.

@zangjihong
Copy link

thanks! I also downgraded the version of tornado. Up to now, there has been no problem yet.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants