Я запускаю приложение Django (Python 2.7) с ноутбуком I Python в контейнере docker и для некоторого ноутбука, при обращении к нему появляется ошибка При загрузке произошла неизвестная ошибка этот блокнот при проверке журналов показывает
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/tornado/web.py", line 1415, in _execute
result = yield result
File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 870, in run
value = future.result()
File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 215, in result
raise_exc_info(self._exc_info)
File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 230, in wrapper
yielded = next(result)
File "/usr/local/lib/python2.7/dist-packages/notebook/services/contents/handlers.py", line 112, in get
path=path, type=type, format=format, content=content,
File "/usr/local/lib/python2.7/dist-packages/notebook/services/contents/filemanager.py", line 433, in get
model = self._notebook_model(path, content=content)
File "/usr/local/lib/python2.7/dist-packages/notebook/services/contents/filemanager.py", line 392, in _notebook_model
self.mark_trusted_cells(nb, path)
File "/usr/local/lib/python2.7/dist-packages/notebook/services/contents/manager.py", line 503, in mark_trusted_cells
trusted = self.notary.check_signature(nb)
File "/usr/local/lib/python2.7/dist-packages/nbformat/sign.py", line 438, in check_signature
signature = self.compute_signature(nb)
File "/usr/local/lib/python2.7/dist-packages/nbformat/sign.py", line 417, in compute_signature
for b in yield_everything(nb):
File "/usr/local/lib/python2.7/dist-packages/nbformat/sign.py", line 272, in yield_everything
for b in yield_everything(value):
File "/usr/local/lib/python2.7/dist-packages/nbformat/sign.py", line 276, in yield_everything
for b in yield_everything(element):
File "/usr/local/lib/python2.7/dist-packages/nbformat/sign.py", line 272, in yield_everything
for b in yield_everything(value):
File "/usr/local/lib/python2.7/dist-packages/nbformat/sign.py", line 276, in yield_everything
for b in yield_everything(element):
File "/usr/local/lib/python2.7/dist-packages/nbformat/sign.py", line 272, in yield_everything
for b in yield_everything(value):
File "/usr/local/lib/python2.7/dist-packages/nbformat/sign.py", line 272, in yield_everything
for b in yield_everything(value):
File "/usr/local/lib/python2.7/dist-packages/nbformat/sign.py", line 276, in yield_everything
for b in yield_everything(element):
File "/usr/local/lib/python2.7/dist-packages/nbformat/sign.py", line 281, in yield_everything
yield str(obj).encode('utf8')
UnicodeEncodeError: 'ascii' codec can't encode character u'\xd7' in position 14: ordinal not in range(128)
Та же проблема возникает, когда я сохраняю файл в форме проблема столбца строки данных во фрейме X была связана с синтаксическим анализом Unicode X (u '\ xd7').
Произошла пробная смена отметки кодирования sys
import sys
reload(sys)
sys.setdefaultencoding("utf-8")