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