Kernel Error in Jupyter Notebook - _kernel_spec_manager_changed() takes 1 positional argument but 2 were given

How to solve “_kernel_spec_manager_changed() takes 1 positional argument but 2 were given”? Uninstall and reinstall tornado again doesn’t help.

Error:
Traceback (most recent call last):
File “/usr/local/lib/python3.9/site-packages/tornado/web.py”, line 1704, in _execute
result = await result
File “/usr/local/lib/python3.9/site-packages/tornado/gen.py”, line 769, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File “/usr/local/lib/python3.9/site-packages/notebook/services/sessions/handlers.py”, line 69, in post
model = yield maybe_future(
File “/usr/local/lib/python3.9/site-packages/tornado/gen.py”, line 762, in run
value = future.result()
File “/usr/local/lib/python3.9/site-packages/tornado/gen.py”, line 769, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File “/usr/local/lib/python3.9/site-packages/notebook/services/sessions/sessionmanager.py”, line 88, in create_session
kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
File “/usr/local/lib/python3.9/site-packages/tornado/gen.py”, line 762, in run
value = future.result()
File “/usr/local/lib/python3.9/site-packages/tornado/gen.py”, line 769, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File “/usr/local/lib/python3.9/site-packages/notebook/services/sessions/sessionmanager.py”, line 100, in start_kernel_for_session
kernel_id = yield maybe_future(
File “/usr/local/lib/python3.9/site-packages/tornado/gen.py”, line 762, in run
value = future.result()
File “/usr/local/lib/python3.9/site-packages/notebook/services/kernels/kernelmanager.py”, line 176, in start_kernel
kernel_id = await maybe_future(self.pinned_superclass.start_kernel(self, **kwargs))
File “/usr/local/lib/python3.9/site-packages/jupyter_client/multikernelmanager.py”, line 184, in start_kernel
km, kernel_name, kernel_id = self.pre_start_kernel(kernel_name, kwargs)
File “/usr/local/lib/python3.9/site-packages/jupyter_client/multikernelmanager.py”, line 169, in pre_start_kernel
km = self.kernel_manager_factory(connection_file=os.path.join(
File “/usr/local/lib/python3.9/site-packages/jupyter_client/multikernelmanager.py”, line 83, in create_kernel_manager
km = kernel_manager_ctor(*args, **kwargs)
File “/usr/local/lib/python3.9/site-packages/traitlets/config/configurable.py”, line 82, in init
super(Configurable, self).init(**kwargs)
File “/usr/local/lib/python3.9/site-packages/traitlets/traitlets.py”, line 1080, in init
super_kwargs[key] = value
File “/usr/local/Cellar/python@3.9/3.9.2_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/contextlib.py”, line 124, in exit
next(self.gen)
File “/usr/local/lib/python3.9/site-packages/traitlets/traitlets.py”, line 1214, in hold_trait_notifications
self.notify_change(change)
File “/usr/local/lib/python3.9/site-packages/traitlets/traitlets.py”, line 1227, in notify_change
return self._notify_observers(change)
File “/usr/local/lib/python3.9/site-packages/traitlets/traitlets.py”, line 1264, in _notify_observers
c(event)
File “/usr/local/lib/python3.9/site-packages/traitlets/traitlets.py”, line 888, in compatible_observer
return func(self, change)
TypeError: _kernel_spec_manager_changed() takes 1 positional argument but 2 were given

Available kernels:
julia-1.5 /Users/mer/Library/Jupyter/kernels/julia-1.5
python2 /Users/mer/Library/Jupyter/kernels/python2
python3 /usr/local/share/jupyter/kernels/python3

Hi @pdflu. This issue has been addressed in jupyter_client >= 6.1.10 per this pull request. Please update your jupyter_client package and you should be moving forward again.

2 Likes