python报错Non-ASCII character

python test.py遇到报错如下
SyntaxError: Non-ASCII character '\xe4' in file produce_xml.py on line 6, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details
原因未知。
可以通过python3 test.py解决

posted @ 2023-02-27 13:58  心比天高xzh  阅读(102)  评论(0)    收藏  举报