Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is Pydev giving a syntax error for built-in keywords?

Why is Pydev giving me syntax errors for built-in python functions like str()?

Undefined variable: str

Undefined variable: False

Undefined variable: float

like image 312
Raffi Khatchadourian Avatar asked Nov 11 '11 20:11

Raffi Khatchadourian


People also ask

What is a syntax error in Python?

Syntax errors are produced by Python when it is translating the source code into byte code. They usually indicate that there is something wrong with the syntax of the program. Example: Omitting the colon at the end of a def statement yields the somewhat redundant message SyntaxError: invalid syntax.

How do I start programming in PyDev?

Go to File → New → PyDev Project to start a wizard. In the next window that appears, enter the name of your project and select "python" and 3.0"; as the type. Make sure "create default 'src' folder and add it to the pythonpath?" is selected. Click Finish.


1 Answers

Remove and re-add the python interpreter in the PyDev configuration. Make sure that the project is using the newly added interpreter.

like image 91
Raffi Khatchadourian Avatar answered Oct 11 '22 19:10

Raffi Khatchadourian