Sudden error: SyntaxError: Non-ASCII character '\xc2' in file

Peter Otten __peter__ at web.de
Wed Mar 30 11:28:10 EDT 2011


Gnarlodious wrote:

> RSS script runs fine on my dev machine but errors on the server
> machine. Script was last run 3 days ago with no problem. Possible
> clue: dev machine is (Mac OSX) running Python 3.1.1 while server is
> running Python 3.1.3. I have not updated anything that should suddenly
> cause this error starting yesterday.
> 
> The error originates at '·' which string contains a ·
> character.
> 
> Complete error message is:
> 
> SyntaxError: Non-ASCII character '\xc2' in file /Library/WebServer/
> Sites/Sectrum/Site/Feed.py on line 17, but no encoding declared; see
> http://www.python.org/peps/pep-0263.html for details
> 
> Any help how to fix this and why it suddenly started erroring 2 days
> ago...

You are trying to run your 3.x code with Python 2.x...




More information about the Python-list mailing list