PyCharm 显示有效代码的未解决引用错误 [英] PyCharm shows unresolved references error for valid code
问题描述
我正在使用 PyCharm 来处理一个项目.项目打开并配置了解释器,可以成功运行.远程解释器路径已正确映射.这似乎是正确的配置,但 PyCharm 用未解析的引用"错误突出显示了我的有效代码,即使对于内置的 Python 函数也是如此.为什么这些似乎没有被检测到,即使代码运行?有没有办法让 PyCharm 正确识别这些?
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屋!