PyCharm 显示有效代码的未解决引用错误 [英] PyCharm shows unresolved references error for valid code

查看:101
本文介绍了PyCharm 显示有效代码的未解决引用错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 PyCharm 来处理一个项目.项目打开并配置了解释器,可以成功运行.远程解释器路径已正确映射.这似乎是正确的配置,但 PyCharm 用未解析的引用"错误突出显示了我的有效代码,即使对于内置的 Python 函数也是如此.为什么这些似乎没有被检测到,即使代码运行?有没有办法让 PyC​​harm 正确识别这些?

I am using PyCharm to work on a project. The project is opened and configured with an interpreter, and can run successfully. The remote interpreter paths are mapped properly. This seems to be the correct configuration, but PyCharm is highlighting my valid code with "unresolved reference" errors, even for built-in Python functions. Why don't these seem to be detected, even though the code runs? Is there any way to get PyCharm to recognize these correctly?

这个问题的具体实例是远程解释器,但问题也出现在本地解释器上.

推荐答案

File |使缓存无效...并重新启动 PyCharm 会有所帮助.

File | Invalidate Caches... and restarting PyCharm helps.

这篇关于PyCharm 显示有效代码的未解决引用错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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