SyntaxError: Non-ASCII character ‘\xce’ in file /usr/work/learning/dqn/core/dqn.py on line 38, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

SyntaxError: Non-ASCII character ‘\xce’ in file /usr/work/learning/dqn/core/dqn.py on line 38, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

Adding the following two line sat the top of my .py script worked for me (first line was necessary):

#!/usr/bin/env python
# -*- coding: utf-8 -*- 

发表评论

电子邮件地址不会被公开。 必填项已用*标注