Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SyntaxError: Non-UTF-8 code starting with '\x82'

Tags:

python

eclipse

I get this error in Eclipse while working on "Byte of Python"

It says the error shows up in 2 lines:

source = ["C:\\My Documents", "C:\\Code"]

and

zip_command = "zip -qr {0} {1}".format(target, ‚ ‚.join(source))

I cant really figure out what im doing wrong here.

Here's the full error:

SyntaxError: Non-UTF-8 code starting with '\x82' on line x, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

like image 291
Elmer Avatar asked Mar 24 '13 18:03

Elmer


1 Answers

You are using chars (curved quotes) encoded in windows-1252 that cannot be decoded because it's not valid utf-8. Replace the quotes and you are good to go.

like image 168
root Avatar answered Nov 06 '22 06:11

root