views:

43

answers:

1

Hello, I need your help, I'm using Eclipse and Pydev plugin as python IDE.

I have configured and set environment variables, libraries etc etc I created a project, and a module.

When I write these lines and run the program, it gives an error:

`a = 3
b = 4.6
print "%d is the value of a, %.2f is the value of b" %(a, b)`

and the error message is:

SyntaxError: Non-ASCII character '\xfd' in file C:\Users\dell\workspace\Deneme\src\test1\o3.py on line 9, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details

However, when i write the same lines in IDLE, it runs without errors.

What is wrong with Pydev??

A: 

Well, the error message pretty much sums it up: There is a non-ascii character in your file. Python 2 source files are expected to be ASCII only, or contain an # -*- coding: <encoding name> -*- (there are other valid forms, see the PEP the error refers to) comment at the top. For Python 3, UTF-8 is allowed too.

I'm pretty sure if you manually navigate to the project folder and run the file, you'll get the same error.

delnan
thanks! it solved the problem
steve