Jupyter 笔记本:TypeError:__init__() 得到了一个意外的关键字参数“io_loop" [英] Jupyter notebook: TypeError: __init__() got an unexpected keyword argument 'io_loop'

查看:41
本文介绍了Jupyter 笔记本:TypeError:__init__() 得到了一个意外的关键字参数“io_loop"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近在我的 macbook pro 上安装了 jupyter notebooks.当我创建一个新的笔记本时,我看到在我启动笔记本的终端上不断出现以下异常.

I recently installed jupyter notebooks on my macbook pro. When I create a new notebook, I see the following exception coming continuously on the terminal where I started the notebook.

Monideeps-MacBook-Pro:PythonNotebooks monideepde$ jupyter-notebook 
[I 12:18:43.675 NotebookApp] Serving notebooks from local directory: /Users/monideepde/Documents/PythonNotebooks
[I 12:18:43.675 NotebookApp] 0 active kernels
[I 12:18:43.676 NotebookApp] The Jupyter Notebook is running at:
[I 12:18:43.676 NotebookApp] http://localhost:8888/?token=dcb1990694d91ded77f4287a588886ea567b5907ac8aeafa
[I 12:18:43.676 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 12:18:43.677 NotebookApp] 

    Copy/paste this URL into your browser when you connect for the first time,
    to login with a token:
        http://localhost:8888/?token=dcb1990694d91ded77f4287a588886ea567b5907ac8aeafa
[I 12:18:43.896 NotebookApp] Accepting one-time-token-authenticated connection from ::1
[W 12:18:44.778 NotebookApp] 404 GET /static/components/moment/locale/en-gb.js?v=20180104121843 (::1) 21.10ms referer=http://localhost:8888/tree
[I 12:18:54.840 NotebookApp] Creating new notebook in 
[W 12:18:55.716 NotebookApp] 404 GET /static/components/moment/locale/en-gb.js?v=20180104121843 (::1) 3.06ms referer=http://localhost:8888/notebooks/Untitled.ipynb?kernel_name=python2
[I 12:18:55.920 NotebookApp] Kernel started: 5e16fa4b-3e35-4265-89b0-ab36bb0573f5
[W 12:18:55.941 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20180104121843 (::1) 5.57ms referer=http://localhost:8888/notebooks/Untitled.ipynb?kernel_name=python2
[I 12:18:56.998 NotebookApp] Adapting to protocol v5.1 for kernel 5e16fa4b-3e35-4265-89b0-ab36bb0573f5
[E 12:18:57.001 NotebookApp] Uncaught exception in /api/kernels/5e16fa4b-3e35-4265-89b0-ab36bb0573f5/channels
    Traceback (most recent call last):
      File "/Library/Python/2.7/site-packages/tornado-5.0a1-py2.7-macosx-10.13-intel.egg/tornado/websocket.py", line 494, in _run_callback
        result = callback(*args, **kwargs)
      File "/Library/Python/2.7/site-packages/notebook-5.2.2-py2.7.egg/notebook/services/kernels/handlers.py", line 258, in open
        super(ZMQChannelsHandler, self).open()
      File "/Library/Python/2.7/site-packages/notebook-5.2.2-py2.7.egg/notebook/base/zmqhandlers.py", line 168, in open
        self.send_ping, self.ping_interval, io_loop=loop,
    TypeError: __init__() got an unexpected keyword argument 'io_loop'
[I 12:18:58.021 NotebookApp] Adapting to protocol v5.1 for kernel 5e16fa4b-3e35-4265-89b0-ab36bb0573f5

Python 版本为 2.7.

Python version is 2.7.

是否有任何指示我如何解决此问题?

Any pointers to how I can resolve this?

推荐答案

我修改了文件/Library/Python/2.7/site-packages/notebook-5.2.2-py2.7.egg/‌ notebook/base/zmqhan‌ dlers.py" 以删除 io_loop 参数.

I modified the file "/Library/Python/2.7/site-packages/notebook-5.2.2-py2.7.egg/‌​notebook/base/zmqhan‌​dlers.py" to remove the io_loop argument.

根据 bkanuka 的评论,这是 Jupyter 发布新版本之前要走的路.

Based on bkanuka's comment, this is the way to go until Jupyter releases a new version.

这篇关于Jupyter 笔记本:TypeError:__init__() 得到了一个意外的关键字参数“io_loop"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆