Eclipse PyDev 抛出错误错误 [英] Eclipse PyDev is throwing false errors

查看:33
本文介绍了Eclipse PyDev 抛出错误错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我昨天更新了 PyDev (Eclipse),现在它告诉我 None、name 和其他保留字/内置函数无效,但脚本运行良好.我在这个论坛上读到这个问题涉及错误地导入内置插件.我曾尝试更改解释器并重新添加它,但没有运气.有人可以帮帮我吗?

I updated PyDev (Eclipse) yesterday and now it is telling me that None, name and other reserved words/builtin functions are invalid, but the script runs just fine. I have read on this forum that the problem deals with incorrectly importing the built-ins. I have tried changing the interpreter and re-adding it but no luck. Can somebody help me please?

错误:

未定义变量ma​​in未定义变量 无未定义变量 int未定义变量评估

Undefined variable main Undefined variable None Undefined variable int Undefined variable eval

我正在运行 eclipse Juno 和 PyDev 2.7.4.另外,我注意到错误仅在 PyDev 代码分析结束后出现.

I am running eclipse Juno and PyDev 2.7.4. also, I notice that the errors only appear after the PyDev code analysis ends.

推荐答案

好吧,我看到没有人提出一些想法.我自己发现了,所以我在这里发布了我是如何解决的;也许它会帮助某人:

Well, I see nobody has come up with some idea. I found out by myself so I'm posting how I solved it here; maybe it'll help somebody:

问题是我最近更改了本地机器的名称,但 PyDev 在尝试连接到 Python Shell 时仍在寻找 localhost.我刚刚更新了操作系统中包含主机名的文件,瞧(自动向导由于某种原因没有更新所有文件,所以我不得不手动进行).

The problem was that I had recently changed my local machine's name, but PyDev was still looking for localhost when it tried to connect to the Python Shell. I just updated the files in my operating system containing the hostname, and voila (the automatic wizard did not update all the files for some reason, so I had to do it manually).

这篇关于Eclipse PyDev 抛出错误错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆