Python Jupyter笔记本:当我打开一个exist或创建一个新的.ipynb文件时,向我显示一个错误:“";500:无效的连续字节“0”;

Python Jupyter笔记本:当我打开一个exist或创建一个新的.ipynb文件时,向我显示一个错误:“";500:无效的连续字节“0”;,python,jupyter-notebook,Python,Jupyter Notebook,我在我的raspberry pi 4中安装了jupyter笔记本,它可以正常工作。 但在我安装了其他软件包后,jupyter笔记本无法打开ipynb文件(显示:“500:无效的继续字节”),我删除了其他软件包,甚至重新安装了jupyter笔记本,但错误仍然存在。 我猜可能有一些配置文件未配置,但我不知道是哪一个。 如何修复此错误?谢谢 jupyter笔记本电脑控制台中的错误消息: Traceback (most recent call last): File "/usr/l

我在我的raspberry pi 4中安装了jupyter笔记本,它可以正常工作。 但在我安装了其他软件包后,jupyter笔记本无法打开ipynb文件(显示:“500:无效的继续字节”),我删除了其他软件包,甚至重新安装了jupyter笔记本,但错误仍然存在。 我猜可能有一些配置文件未配置,但我不知道是哪一个。 如何修复此错误?谢谢

jupyter笔记本电脑控制台中的错误消息:

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

我检查了ipynb文件,它可以使用python utf-8打开,但我不知道为什么不能在jupyter笔记本下打开。

谢谢hiro。你的建议奏效了。我找到了打开的configparser.py文件。结果是“python3.7/site packages/tqdm-4.56.0.dist info/entry_points.txt”。我删除了文件,jupyter工作正常。

我不是这方面的专家,但抱怨的是
configparser.py
。问题可能出在jupyter的配置文件中吗?(我甚至不知道在哪里可以找到这些,对不起)。谢谢。配置解析器。py与python一起出现在python目录下。我没有改变,我不是这个意思。configparser将解析某个位于某处的配置文件(可能是
*:ini
?)。配置文件中可能有问题。谢谢hiro。你的建议奏效了。我找到了打开的configparser.py文件。结果是“python3.7/site packages/tqdm-4.56.0.dist info/entry_points.txt”。我删除了这个文件,jupyter就可以正常工作了。奇怪的是,一个分发给你安装的文件。。。只要它现在起作用!