Non-ASCII charcter ‘\xe5’ in file path on line but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

Time:2021-10-23

Run main.py and report an error

Error reason: the document has Chinese comments, which conflicts with the character code of system operation

 

Solution (I):

Add the following code comment to the document header to tell Python to force the character encoding to compile

Windows operating system

#coding=utf-8

Linux operating system

#coding=utf-8
#!/usr/bin/python

 

Solution (II):

Uninstall the old version of python2. X, keep or install the new version of python3.7 or above

 

 

Recommended Today

SQL exercise 20 – Modeling & Reporting

This blog is used to review and sort out the common topic modeling architecture, analysis oriented architecture and integration topic reports in data warehouse. I have uploaded these reports to GitHub. If you are interested, you can have a lookAddress:https://github.com/nino-laiqiu/TiTanI recorded a relatively complete development process in my hexo blog deployed on GitHub. You can […]