jupyter: Jupyter showing kernel error...
I use the jupyter that comes with anaconda distribution. My python version is 3.5.2 and my conda version is 4.5
This problem occurred when I interrupted my program when it was in middle of running.
This problem occurred once more earlier when I interrupted my program when it was running though the traceback was not same. I was able to solve it by myself by updating the pyzmq to latest version.
Here is my traceback
Traceback (most recent call last):
File "C:\Users\ROCKSTAR\Anaconda3\lib\site-packages\traitlets\traitlets.py", line 526, 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 "C:\Users\ROCKSTAR\Anaconda3\lib\site-packages\notebook\base\handlers.py", line 457, in wrapper
result = yield gen.maybe_future(method(self, *args, **kwargs))
File "C:\Users\ROCKSTAR\Anaconda3\lib\site-packages\tornado\gen.py", line 1099, in run
value = future.result()
File "C:\Users\ROCKSTAR\Anaconda3\lib\asyncio\futures.py", line 274, in result
raise self._exception
File "C:\Users\ROCKSTAR\Anaconda3\lib\site-packages\tornado\gen.py", line 1107, in run
yielded = self.gen.throw(*exc_info)
File "C:\Users\ROCKSTAR\Anaconda3\lib\site-packages\notebook\services\sessions\handlers.py", line 62, in post
kernel_id=kernel_id))
File "C:\Users\ROCKSTAR\Anaconda3\lib\site-packages\tornado\gen.py", line 1099, in run
value = future.result()
File "C:\Users\ROCKSTAR\Anaconda3\lib\asyncio\futures.py", line 274, in result
raise self._exception
File "C:\Users\ROCKSTAR\Anaconda3\lib\site-packages\tornado\gen.py", line 1107, in run
yielded = self.gen.throw(*exc_info)
File "C:\Users\ROCKSTAR\Anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 79, in create_session
kernel_name)
File "C:\Users\ROCKSTAR\Anaconda3\lib\site-packages\tornado\gen.py", line 1099, in run
value = future.result()
File "C:\Users\ROCKSTAR\Anaconda3\lib\asyncio\futures.py", line 274, in result
raise self._exception
File "C:\Users\ROCKSTAR\Anaconda3\lib\site-packages\tornado\gen.py", line 1107, in run
yielded = self.gen.throw(*exc_info)
File "C:\Users\ROCKSTAR\Anaconda3\lib\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 "C:\Users\ROCKSTAR\Anaconda3\lib\site-packages\tornado\gen.py", line 1099, in run
value = future.result()
File "C:\Users\ROCKSTAR\Anaconda3\lib\asyncio\futures.py", line 274, in result
raise self._exception
File "C:\Users\ROCKSTAR\Anaconda3\lib\site-packages\tornado\gen.py", line 315, in wrapper
yielded = next(result)
File "C:\Users\ROCKSTAR\Anaconda3\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 87, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "C:\Users\ROCKSTAR\Anaconda3\lib\site-packages\jupyter_client\multikernelmanager.py", line 110, in start_kernel
km.start_kernel(**kwargs)
File "C:\Users\ROCKSTAR\Anaconda3\lib\site-packages\jupyter_client\manager.py", line 244, in start_kernel
self.start_restarter()
File "C:\Users\ROCKSTAR\Anaconda3\lib\site-packages\jupyter_client\ioloop\manager.py", line 49, in start_restarter
kernel_manager=self, loop=self.loop,
File "C:\Users\ROCKSTAR\Anaconda3\lib\site-packages\traitlets\traitlets.py", line 554, in __get__
return self.get(obj, cls)
File "C:\Users\ROCKSTAR\Anaconda3\lib\site-packages\traitlets\traitlets.py", line 533, in get
value = self._validate(obj, dynamic_default())
File "C:\Users\ROCKSTAR\Anaconda3\lib\site-packages\traitlets\traitlets.py", line 589, in _validate
value = self.validate(obj, value)
File "C:\Users\ROCKSTAR\Anaconda3\lib\site-packages\traitlets\traitlets.py", line 1681, in validate
self.error(obj, value)
File "C:\Users\ROCKSTAR\Anaconda3\lib\site-packages\traitlets\traitlets.py", line 1528, 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 0x000001B37F8A7908>) was specified.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (2 by maintainers)
It seems that upgrading
ipykernel
to >=4.8.2 and downgrading tornado to 4.5.3 can fix this issue. I first ranconda update --all
and thenconda install tornado=4.5.3
and finallyconda install ipykernel
OK, I hope reinstalling Anaconda has fixed it. If you run into it again, check if the error message changes (especially the bit at the end, which is the real error). I don’t think it should be possible to get that message with an up-to-date jupyter_client.
I think that means you need to update your
jupyter_client
package to be compatible with the more recent zmq.I fixed the issue. It was missing py4j and I installed it through pip. “pip install py4j”
@SahithiGunna It should be ipykernel
for me, this happened after i installed JupyterHub.
to fix i had to do:
conda update --all
conda install ipykernel
conda install libgcc=5.2.0
I had similar issues that were not resolved with py4j, but after I upgraded all packages with the recipe here: https://stackoverflow.com/questions/2720014/upgrading-all-packages-with-pip, startup problems went away.
I have the same problem. What should I do about it?