WEB_KG icon indicating copy to clipboard operation
WEB_KG copied to clipboard

python3.6 get UnicodeEncodeError: 'ascii' codec can't encode characters in position 11-14: ordinal not in range(128)

Open Yazhou-Liu opened this issue 5 years ago • 1 comments

Traceback (most recent call last): File "html_parser.py", line 55, in new_urls, _ = parser.parse(content) File "html_parser.py", line 44, in parse is_saved = self._save_new_data( soup,html_cont) File "html_parser.py", line 34, in _save_new_data with open(os.path.join(path ,title+'.html'), 'w') as f: UnicodeEncodeError: 'ascii' codec can't encode characters in position 11-14: ordinal not in range(128)

Yazhou-Liu avatar Jul 22 '19 07:07 Yazhou-Liu

这个是Windows编码问题。建议用ubuntu运行。

lixiang0 avatar Jul 23 '19 13:07 lixiang0