-
Notifications
You must be signed in to change notification settings - Fork 14
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
UnicodeEncodeError running autopep8 on Windows using pyevn #87
Comments
@john1997x Can you run the command from the terminal? This looks like an issue with autopep8 itself or the encoding used to save the file (the file should be saved as UTF-8).
Make sure to include the |
similar problem when autopep8 formatting log:
|
Me too log:
|
If I remove all the code with Chinese, I won't get this error. |
@Usercyk Can you share your environment variables? |
@Usercyk Can you also confirm if the encoding for your python file is utf-8? You should be able to see the encoding on your status bar. |
The issue is caused by a bug in autopep8 itself. hhatto/autopep8#685 |
give a way to avoid the case: change VS setting "files.encoding": "gbk" as same as the OS default encode . or change OS default encode to utf-8. the reason is |
While running the msautopep8 extension in vscode I am getting this error whenever a file change happens (the autopep8 server starts with no problems the error only shows when actually formatting).
UnicodeEncodeError: 'charmap' codec can't encode character '\udc9d' in position 27664: character maps to <undefined>
Full log:
The text was updated successfully, but these errors were encountered: