鱼C论坛

 找回密码
 立即注册
查看: 808|回复: 1

在jupyter打开文件报错 500 : Internal Server Error

[复制链接]
发表于 2022-5-4 14:12:04 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
请问有没有人知道这是为什么?
完整内容如下:

<(base) C:\Users\chxyw>jupyter notebook
[I 14:08:12.052 NotebookApp] The port 8888 is already in use, trying another port.
[I 14:08:12.074 NotebookApp] Serving notebooks from local directory: C:\Users\chxyw
[I 14:08:12.077 NotebookApp] Jupyter Notebook 6.4.11 is running at:
[I 14:08:12.078 NotebookApp] http://localhost:8889/?token=ad1bdb020f844755dad25ee7d242f559c5dee48fc6be6f7e
[I 14:08:12.082 NotebookApp]  or http://127.0.0.1:8889/?token=ad1 ... 559c5dee48fc6be6f7e
[I 14:08:12.084 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 14:08:12.445 NotebookApp]

    To access the notebook, open this file in a browser:
        file:///C:/Users/chxyw/AppData/Roaming/jupyter/runtime/nbserver-17972-open.html
    Or copy and paste one of these URLs:
        http://localhost:8889/?token=ad1bdb020f844755dad25ee7d242f559c5dee48fc6be6f7e
     or http://127.0.0.1:8889/?token=ad1 ... 559c5dee48fc6be6f7e
[E 14:08:22.348 NotebookApp] Uncaught exception GET /notebooks/ML/regress_1.ipynb (::1)
    HTTPServerRequest(protocol='http', host='localhost:8889', method='GET', uri='/notebooks/ML/regress_1.ipynb', version='HTTP/1.1', remote_ip='::1')
    Traceback (most recent call last):
      File "C:\Users\chxyw\AppData\Roaming\Python\Python37\site-packages\tornado\web.py", line 1704, in _execute
        result = await result
      File "C:\Users\chxyw\AppData\Roaming\Python\Python37\site-packages\tornado\gen.py", line 775, in run
        yielded = self.gen.send(value)
      File "C:\Users\chxyw\AppData\Roaming\Python\Python37\site-packages\notebook\notebook\handlers.py", line 100, in get
        get_frontend_exporters=get_frontend_exporters
      File "C:\Users\chxyw\AppData\Roaming\Python\Python37\site-packages\notebook\base\handlers.py", line 511, in render_template
        return template.render(**ns)
      File "C:\Users\chxyw\AppData\Roaming\Python\Python37\site-packages\jinja2\environment.py", line 1301, in render
        self.environment.handle_exception()
      File "C:\Users\chxyw\AppData\Roaming\Python\Python37\site-packages\jinja2\environment.py", line 936, in handle_exception
        raise rewrite_traceback_stack(source=source)
      File "C:\Users\chxyw\AppData\Roaming\Python\Python37\site-packages\notebook\templates\notebook.html", line 1, in top-level template code
        {% extends "page.html" %}
      File "C:\Users\chxyw\AppData\Roaming\Python\Python37\site-packages\notebook\templates\page.html", line 154, in top-level template code
        {% block header %}
      File "C:\Users\chxyw\AppData\Roaming\Python\Python37\site-packages\notebook\templates\notebook.html", line 115, in block 'header'
        {% for exporter in get_frontend_exporters() %}
      File "C:\Users\chxyw\AppData\Roaming\Python\Python37\site-packages\notebook\notebook\handlers.py", line 40, in get_frontend_exporters
        for name in get_export_names():
      File "C:\Users\chxyw\AppData\Roaming\Python\Python37\site-packages\nbconvert\exporters\base.py", line 149, in get_export_names
        e = get_exporter(exporter_name)(config=config)
      File "C:\Users\chxyw\AppData\Roaming\Python\Python37\site-packages\nbconvert\exporters\base.py", line 100, in get_exporter
        exporter = entrypoints.get_single("nbconvert.exporters", name).load()
      File "C:\Users\chxyw\AppData\Roaming\Python\Python37\site-packages\entrypoints.py", line 79, in load
        mod = import_module(self.module_name)
      File "C:\Users\chxyw\.conda\envs\py3.7\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 953, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
      File "<frozen importlib._bootstrap>", line 983, in _find_and_load
      File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
      File "<frozen importlib._bootstrap>", line 983, in _find_and_load
      File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
      File "<frozen importlib._bootstrap_external>", line 728, in exec_module
      File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
      File "C:\Users\chxyw\AppData\Roaming\Python\Python37\site-packages\jupyter_contrib_nbextensions\__init__.py", line 5, in <module>
        import jupyter_nbextensions_configurator
      File "C:\Users\chxyw\AppData\Roaming\Python\Python37\site-packages\jupyter_nbextensions_configurator\__init__.py", line 16, in <module>
        import yaml
    ModuleNotFoundError: No module named 'yaml'
[E 14:08:22.392 NotebookApp] {
      "Host": "localhost:8889",
      "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
      "Referer": "http://localhost:8889/tree/ML",
      "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4844.51 Safari/537.36 Edg/99.0.1150.39"
    }
[E 14:08:22.399 NotebookApp] 500 GET /notebooks/ML/regress_1.ipynb (::1) 1204.390000ms referer=http://localhost:8889/tree/ML>

想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2022-5-4 14:25:32 | 显示全部楼层
本帖最后由 isdkz 于 2022-5-4 14:32 编辑

你的报错信息里有一句

ModuleNotFoundError: No module named 'yaml'

应该是缺少了 pyyaml 这个库,执行一下这条命令看看:
pip install pyyaml -i https://mirrors.aliyun.com/pypi/simple
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-11-18 12:43

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表