Pychorm提示Unresolved reference 导入模块报错


最近使用Pychorm编写Python时,每次要引入自定义模块,就会报错,提示“Unresolved reference”

Unresolved reference 'LoginClass' more... (Ctrl+F1) 

This inspection detects names that should resolve but don't. Due to dynamic dispatch and duck typing, this is possible in a limited but useful number of cases. Top-level and class-level items are supported better than instance items.

百度试了很多方法,结果都没用,最后很简单用一步就解决了,大家都可以试试

右击被调用模块存在的文件夹,“MarkDictionary as”-->“Sources root”

再次查看,报错消失了。

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM