【问题标题】:Unable to connect to a local runtime: Error loading server extension —无法连接到本地运行时:加载服务器扩展时出错 —
【发布时间】:2020-10-07 08:35:28
【问题描述】:

我正在尝试连接到本地运行时以编辑 Mask R-CNN model ,但出现以下错误:Error loading server extension —

jupyter_http_over_ws extension initialized. Listening on /http_over_websocket
[I 00:48:59.298 NotebookApp] JupyterLab extension loaded from C:\Users\Issstezac1\anaconda3\lib\site-pack
ages\jupyterlab
[I 00:48:59.298 NotebookApp] JupyterLab application directory is C:\Users\Issstezac1\anaconda3\share\jupy
ter\lab
[W 00:48:59.314 NotebookApp] Error loading server extension —
    Traceback (most recent call last):
      File "C:\Users\Issstezac1\anaconda3\lib\site-packages\notebook\notebookapp.py", line 1670, in init_
server_extensions
        mod = importlib.import_module(modulename)
      File "C:\Users\Issstezac1\anaconda3\lib\importlib\__init__.py", line 127, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
      File "<frozen importlib._bootstrap>", line 983, in _find_and_load
      File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
    ModuleNotFoundError: No module named '—'
[I 00:48:59.314 NotebookApp] Serving notebooks from local directory: C:\
[I 00:48:59.314 NotebookApp] The Jupyter Notebook is running at:
[I 00:48:59.330 NotebookApp] http://localhost:8888/?token=325c5ffe303c1c7b54b2639d3c6a256550411126dbfb974
5
[I 00:48:59.330 NotebookApp]  or http://127.0.0.1:8888/?token=325c5ffe303c1c7b54b2639d3c6a256550411126dbf
b9745
[I 00:48:59.330 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip c
onfirmation).
[C 00:48:59.392 NotebookApp]

    To access the notebook, open this file in a browser:
        file:///C:/Users/Issstezac1/AppData/Roaming/jupyter/runtime/nbserver-2716-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/?token=325c5ffe303c1c7b54b2639d3c6a256550411126dbfb9745
     or http://127.0.0.1:8888/?token=325c5ffe303c1c7b54b2639d3c6a256550411126dbfb9745
[W 00:50:09.451 NotebookApp] Blocking Cross Origin API request for /http_over_websocket.  Origin: https:/
/colab.research.google.com, Host: localhost:8888
[W 00:50:09.451 NotebookApp] 403 GET /http_over_websocket?min_version=0.0.7&jupyter_http_over_ws_auth_url
=http%3A%2F%2Flocalhost%3A8888%2F%3Ftoken%3D325c5ffe303c1c7b54b2639d3c6a256550411126dbfb9745 (::1) 0.00ms
 referer=None
[W 00:50:12.951 NotebookApp] Blocking Cross Origin API request for /http_over_websocket/diagnose.  Origin
: https://colab.research.google.com, Host: localhost:8888
[W 00:50:12.951 NotebookApp] 403 GET /http_over_websocket/diagnose?min_version=0.0.7 (::1) 0.00ms referer
=None

我关注了文档中的每个step,但我仍然无法在本地连接。目前,我使用的是 Mozilla 77.0.1(64 位)版本。因此,我启用了network.websocket.allowInsecureFromHTTPS,如特定浏览器设置中所述。即使我尝试了--no-browser 标志作为Jupyter HTTP-over-WebSocket 故障排除建议。我做错了什么?

任何进一步的帮助将不胜感激。

【问题讨论】:

    标签: jupyter google-colaboratory


    【解决方案1】:

    有一些原因比如

    1. 您的浏览器扩展程序(删除/全部停止,因为它们阻止了您)
    2. 使用

    jupyter 笔记本 --NotebookApp.allow_origin='https://colab.research.google.com' \ --port=9090 --no-browser

    【讨论】:

      【解决方案2】:

      确保您计算机上的笔记本服务器在端口 8888 上运行并接受来自https://colab.research.google.com 的请求。

      试试下面的命令

      jupyter notebook \
        --NotebookApp.allow_origin='https://colab.research.google.com' \
        --port=8888 \
        --NotebookApp.port_retries=0
      

      【讨论】:

        【解决方案3】:

        对于任何已经尝试过上述解决方案但对您不起作用的人

        尝试以管理员身份运行Cmd并粘贴

        jupyter notebook --NotebookApp.allow_origin='https://colab.research.google.com' \
        --port=9090 --no-browser
        

        这个解决方案适合我

        【讨论】:

          猜你喜欢
          • 2017-08-19
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2014-05-19
          • 1970-01-01
          • 2014-08-10
          • 1970-01-01
          相关资源
          最近更新 更多