15

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

Undefined variable: str

Undefined variable: False

Undefined variable: float

Community
  • 1
  • 1
Raffi Khatchadourian
  • 3,042
  • 3
  • 31
  • 37

3 Answers3

20

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

Raffi Khatchadourian
  • 3,042
  • 3
  • 31
  • 37
  • 1
    This had no effect on freshly installed Aptana 3.6 PyDev running OS X 10.11 . I am still getting "Undefined variable: None". I had not choice but to revert to Aptana 3.4. – user1255933 Feb 24 '16 at 00:10
  • I tried that, it did not fix the problem using python 3.4 in an anaconda environment. – Soerendip Jul 06 '16 at 15:51
3

This means that there's a problem with starting the shell to get completions for builtins (usually a firewall or a misconfiguration in the network -- see: http://pydev.org/faq.html#PyDevFAQ-WhenIdoacodecompletion%2CPyDevhangs%2CwhatcanIdo%3F which may give you hints on how to solve it).

Also, please add details on your error log if you're unable to solve it (see: http://pydev.org/faq.html#how_do_i_report_a_bug for details on getting the error log).

RickyA
  • 15,465
  • 5
  • 71
  • 95
Fabio Zadrozny
  • 24,814
  • 4
  • 66
  • 78
  • That's interesting, but I don't have a problem with the hanging completions. It's more a matter of built-ins not being recognized. This is a difficult one to reproduce, but if it happens again I will report the bug. – Raffi Khatchadourian Nov 14 '11 at 22:45
  • @Fabio I've had both, and actually your first link led me to the solution. – tishma Mar 25 '13 at 17:32
0

For those ppl who are using Aptana and have the same Problem:

I upgraded Aptana and PyDev with the following instructions:

Update PyDev on Aptana

after the upgrade PyDev worked just fine for me :)

Community
  • 1
  • 1
  • Whilst this may theoretically answer the question, [it would be preferable](http://meta.stackoverflow.com/q/8259) to include the essential parts of the answer here, and provide the link for reference. – Yurii Mar 30 '15 at 13:20