0

My *.py script has some non-ASCII characters in comment lines and when I run it I am getting the following warning:

sys:1: DeprecationWarning: Non-ASCII character '\xe5' in file /Users/haitran/Documents/Sophomore UCB/Python/cedict.py on line 118, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details

The thing is I went to the indicated page and fixed my script by putting:
# -*- coding: <utf-8> -*-
on the second line and I'm still getting the warning. The script runs, but the warning is annoying and I don't understand what I need to do to make it stop coming up. What am I doing wrong?

Thanks in advance.

2
Contributors
2
Replies
3
Views
10 Years
Discussion Span
Last Post by trihaitran
0

Haha it was a really basic mistake. There are no <> signs. e.g.

# -*- coding: utf-8 -*-
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.