Open Vyomax opened 6 years ago
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
[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
print_title(point.text)
File "download.py", line 50, in print_title
print('\n'.join(("", title, pattern * len(title))))
File "C:\Python27\lib\encodings\cp437.py", line 12, in encode
return codecs.charmap_encode(input,errors,encoding_map)
UnicodeEncodeError: 'charmap' codec can't encode character u'\uff08' in position 23: character maps to