Jump to content

Recommended Posts

Posted

I use the serial library but when I import it. it will show an error. why?

File "test.py", line 1

SyntaxError: Non-ASCII character '\xe2' in file test.py on line 1, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details

when i change coding, with the following code, it has the error again

# coding: utf-8

how can i solve it??

Posted

Your problem's description is not clear ...

Can you show us what your test.py contains ?

If you have utf-8 issues, you probably need to do a "export PYTHONIOENCODING=UTF-8" before starting your script.

 

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines