PyCharm unresolved reference when importing class from other file

后端 未结 5 1267
遇见更好的自我
遇见更好的自我 2021-01-11 11:00

This problem has been driving me nuts. I am trying to import a class from a file in the same directory. PyCharm is giving me the \"Unresolved reference\" error. MyClas

5条回答
  •  滥情空心
    2021-01-11 11:32

    The following steps solved my issues:

    • All directories required at least a blank __init__.py file
    • Mark all directories as source roots (per previous poster instructions)

提交回复
热议问题