简体   繁体   English

Jupyter notebook:当我打开一个存在或创建一个 new.ipynb 文件时,显示一个错误:“500:无效的继续字节”

[英]Jupyter notebook : when i open an exist or create a new .ipynb file, show me an error: “500 : invalid continuation byte”

I installed jupyter notebook in my raspberry pi 4, and it works.我在我的树莓派 4 中安装了 jupyter notebook,它可以工作。 but after i installed some other package, the jupyter notebook can't open ipynb file (shows: "500: invalid continuation byte") I remove other package,even reinstall the jupyter notebook,but the error still exist.但是在我安装了其他一些package之后,jupyter笔记本无法打开ipynb文件(显示:“500:无效的继续字节”)我删除了其他package,甚至重新安装了jupyter笔记本,但错误仍然存在。 I guess there may be some configuration file miss configured,but i don't know which one.我猜可能有一些配置文件未配置,但我不知道是哪一个。 How can i fix this error?我该如何解决这个错误? Thanks.谢谢。

The error message in jupyter notebook console: jupyter notebook 控制台中的错误消息:

Traceback (most recent call last):
      File "/usr/local/lib/python3.7/dist-packages/tornado/web.py", line 1704, in _execute
        result = await result
      File "/usr/local/lib/python3.7/dist-packages/tornado/gen.py", line 775, in run
        yielded = self.gen.send(value)
      File "/home/pi/.local/lib/python3.7/site-packages/notebook/notebook/handlers.py", line 101, in get
        get_frontend_exporters=get_frontend_exporters
      File "/home/pi/.local/lib/python3.7/site-packages/notebook/base/handlers.py", line 516, in render_template
        return template.render(**ns)
      File "/home/pi/.local/lib/python3.7/site-packages/jinja2/environment.py", line 1090, in render
        self.environment.handle_exception()
      File "/home/pi/.local/lib/python3.7/site-packages/jinja2/environment.py", line 832, in handle_exception
        reraise(*rewrite_traceback_stack(source=source))
      File "/home/pi/.local/lib/python3.7/site-packages/jinja2/_compat.py", line 28, in reraise
        raise value.with_traceback(tb)
      File "/home/pi/.local/lib/python3.7/site-packages/notebook/templates/notebook.html", line 1, in top-level template code
        {% extends "page.html" %}
      File "/home/pi/.local/lib/python3.7/site-packages/notebook/templates/page.html", line 154, in top-level template code
        {% block header %}
      File "/home/pi/.local/lib/python3.7/site-packages/notebook/templates/notebook.html", line 115, in block "header"
        {% for exporter in get_frontend_exporters() %}
      File "/home/pi/.local/lib/python3.7/site-packages/notebook/notebook/handlers.py", line 40, in get_frontend_exporters
        for name in get_export_names():
      File "/home/pi/.local/lib/python3.7/site-packages/nbconvert/exporters/base.py", line 122, in get_export_names
        return sorted(entrypoints.get_group_named('nbconvert.exporters'))
      File "/usr/lib/python3/dist-packages/entrypoints.py", line 222, in get_group_named
        for ep in get_group_all(group, path=path):
      File "/usr/lib/python3/dist-packages/entrypoints.py", line 233, in get_group_all
        for config, distro in iter_files_distros(path=path):
      File "/usr/lib/python3/dist-packages/entrypoints.py", line 199, in iter_files_distros
        cp.read([path])
      File "/usr/lib/python3.7/configparser.py", line 697, in read
        self._read(fp, filename)
      File "/usr/lib/python3.7/configparser.py", line 1015, in _read
        for lineno, line in enumerate(fp, start=1):
      File "/usr/lib/python3.7/codecs.py", line 322, in decode
        (result, consumed) = self._buffer_decode(data, self.errors, final)
    UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd2 in position 0: invalid continuation byte

I check the ipynb file, it can open use python utf-8, but i don't know why can't open under the jupyter notebook.我查看了ipynb文件,使用python utf-8可以打开,但是不知道为什么在jupyter notebook下打不开。

Thanks hiro.谢谢宏。 Your suggestion worked.你的建议奏效了。 I found which file configparser.py opened.我找到了哪个文件 configparser.py 打开了。 it's turn out "python3.7/site-packages/tqdm-4.56.0.dist-info/entry_points.txt".结果是“python3.7/site-packages/tqdm-4.56.0.dist-info/entry_points.txt”。 I delete the file and the jupyter work properly.我删除了文件,jupyter 工作正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何直接从终端创建和打开 jupyter notebook ipynb 文件 - How to create and open a jupyter notebook ipynb file directly from terminal Jupyter Notebook 加载 .ipynb 文件时出错 - Jupyter Notebook error loading an .ipynb file Jupyter Notebook:文件“ .ipynb_checkpoints”不存在-Python - Jupyter Notebook: File “.ipynb_checkpoints” does not exist - Python 我应该如何修改 JSON 元数据以便我可以在 jupyter notebook 中打开 ipynb 文件? - How should I modify the JSON metadata so that I can open a ipynb file in a jupyter notebook? 为什么我不能在 Pycharm 中创建 jupyter notebook 并正确打开 ipynb? - Why can't I create jupyter notebook and open ipynb correctly in Pycharm? 读取文件时无效的连续字节 - invalid continuation byte when reading file 启动 Jupyter 笔记本时出现 500 内部服务器错误 - 500 internal server error when I launch Jupyter notebook Jupyter Notebook:导入.ipynb文件,并在其他.ipynb文件中访问它的方法,给出错误 - Jupyter Notebook: Import .ipynb file and access it's method in other .ipynb file giving error vscode:如何自动缩进jupyter notebook ipynb文件? - vscode: how to autoindent jupyter notebook ipynb file? 当我打开 Jupyter Notebook 时,出现 Kernel 错误 - When I open Jupyter Notebook there is a Kernel Error appears
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM