Syntax Error: non-UTF-8 code starting with '\ x82'

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

It says that the error is displayed in two lines:

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

and

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

I cannot understand what I'm doing wrong here.

Here's the complete error:

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

+5
source share
1 answer

You are using characters (curved quotes) encoded in windows-1252that cannot be decoded because it is invalid utf-8. Replace the quotation marks, and you're good to go.

+3
source

All Articles