Unable to open console when napari launched from terminal

When using Napari from a notebook everything is fine and I can open the qtconsole, but when I start Napari from a terminal I got the following issue:

Traceback (most recent call last):
  File "/home/hugo/.local/lib/python3.6/site-packages/napari/_qt/qt_viewer.py", line 455, in toggle_console_visibility
    _ = self.console
  File "/home/hugo/.local/lib/python3.6/site-packages/napari/_qt/qt_viewer.py", line 199, in console
    self.console = QtConsole({'viewer': self.viewer})
  File "/home/hugo/.local/lib/python3.6/site-packages/napari/_qt/qt_console.py", line 80, in __init__
    kernel_client.start_channels()
  File "/home/hugo/.local/lib/python3.6/site-packages/qtconsole/kernel_mixins.py", line 47, in start_channels
    super(QtKernelClientMixin, self).start_channels(*args, **kw)
  File "/home/hugo/.local/lib/python3.6/site-packages/ipykernel/inprocess/client.py", line 64, in start_channels
    super(InProcessKernelClient, self).start_channels()
  File "/home/hugo/.local/lib/python3.6/site-packages/jupyter_client/client.py", line 118, in start_channels
    self.control_channel.start()
  File "/home/hugo/.local/lib/python3.6/site-packages/jupyter_client/client.py", line 200, in control_channel
    socket, self.session, self.ioloop
TypeError: object() takes no parameters

Do you have some guess to fix this?

Best,
Hugo.

Hi Hugo! I only did a small search but came upon this issue:

Which indeed used to be an issue with ipykernel=6.0.0. So I think you should try pip install -U ipykernel and I hope that will fix it! :grimacing::crossed_fingers:

Thanks for your small but efficient search, this solve the issue :+1:

1 Like