Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Yazhou-Liu opened this issue Jul 22, 2019 · 1 comment

Comments

@Yazhou-Liu
Copy link

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)

@lixiang0
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants