I installed jupyter notebook in my raspberry pi 4, and it works. 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. 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:
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.
Thanks hiro. Your suggestion worked. I found which file configparser.py opened. it's turn out "python3.7/site-packages/tqdm-4.56.0.dist-info/entry_points.txt". I delete the file and the jupyter work properly.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.