when using a python program on the Internet, an error occurs when compiling:
File “xxx.py”, line 8 SyntaxError: Non-ASCII character ‘\xe8’ in file xxx.py on line 8, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
The reason is that the encoding type declaration is missing: no encoding declared
Add a line declaration at the beginning of the paragraph
# encoding:utf-8
Copyright notice: This is CSDN blogger [applebite]( http://blog.csdn.net/applebite )Original article, reprint please indicate the source, infringement must be investigated. WeChat adds official account number: qi_ Chuang or novelty hunting innovation platform
Similar Posts:
- Python PIP installs scrapy with an error of twisted
- java.io.IOException: Server returned HTTP response code: 405 for URL:
- Completely solve MySQL error: 1030, ‘got error 28 from storage engine’
- Error lnk2026: module unsafe for safeseh image
- Install wechat, chrome, etc. on Ubuntu 16.04
- ERROR EPERM: operation not permitted, mkdir ‘C:\Users\Administrator\Desktop\text\nuxt\basic\…
- fatal:’origin’ does not appear to be a git repository fatal:Could not read from remote re…
- Foxmail configuration Netease enterprise mailbox – err unable to log on solution
- cleartext http traffic to 192.168.1.106 not permitted
- Yao Wen Chang, Taiwan University