Deep-Learning-Papers-Reading-Roadmap
Deep-Learning-Papers-Reading-Roadmap copied to clipboard
UnicodeEncodeError: 'charmap' codec can't encode
[3] "Reducing the dimensionality of data with neur [...] (http://www.cs.toronto.edu/~hinton/science.pdf)
Traceback (most recent call last):
File "download.py", line 102, in
Add encoding='utf8'
anywhere in the download.py
when it tries to open some file.
At line 87 use this instead:
with open('README.md',encoding='utf8') as readme:
readme_html = mistune.markdown(readme.read(),encoding='utf8')
readme_soup = BeautifulSoup.BeautifulSoup(readme_html, "html.parser")
在第87行使用此代替:
with open('README.md',encoding='utf8') as readme: readme_html = mistune.markdown(readme.read(),encoding='utf8') readme_soup = BeautifulSoup.BeautifulSoup(readme_html, "html.parser")
但仍会出现以下问题 UnicodeDecodeError: 'gbk' codec can't decode byte 0x89 in position 1829: illegal multibyte sequence
Maybe it should be 'utf-8' instead of 'utf8' since this is what I tried this morning on my own, and it worked @zylcs