A Jupyter notebook that contains Unicode characters seems to be failing when converted to Python code:
…
File "/…/anaconda/envs/py2/lib/python2.7/site-packages/ipymd/utils/utils.py", line 133, in _write_text
f.write(contents)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 15310: ordinal not in range(128)
Encoding the Python file in UTF-8 instead works (f.write(contents.encode("utf-8"))), but then probably this should also add a # coding=UTF-8 at the beginning of the generated Python file.
Also, the conversion back to a Jupyter notebook might have to be adapted so as to be compatible with this change.
A Jupyter notebook that contains Unicode characters seems to be failing when converted to Python code:
Encoding the Python file in UTF-8 instead works (
f.write(contents.encode("utf-8"))), but then probably this should also add a# coding=UTF-8at the beginning of the generated Python file.Also, the conversion back to a Jupyter notebook might have to be adapted so as to be compatible with this change.