Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

PyCharm does not see source root

I have marked the folder as source root but PyCharm still is not able to import from there without warnings. In the given picture I am trying to import from the models to the document.py. How can I fix it?

enter image description here

enter image description here

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

Once you’re inside a folder, you don’t really see where you are. Source root contains packages and it’s not a package on its own, so to be able to import models, you gotta make its parent folder (api) a source root.

This is also better because you have code next to models, in app, and it’s part of the source as well. 😉

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading