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

不想你离开。 提交于 2019-11-29 17:10:23

问题


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

Undefined variable: str

Undefined variable: False

Undefined variable: float


回答1:


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




回答2:


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).




回答3:


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 :)



来源:https://stackoverflow.com/questions/8099380/why-is-pydev-giving-a-syntax-error-for-built-in-keywords

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!