Reputation: 349
I'm working on a Python project where I have this folder structure:
I'm currently editing the operators.py
file and I get this error when I try to import a class from the hooks.py
file.
I really don't understand why I get this error since by putting the __init__.py
file in the custom
folder I should have turned it into a python module.
Upvotes: 0
Views: 53
Reputation: 148
it seems your operators.py file is int the same module as hooks, so :
from .hooks import TrediWSHook
Upvotes: 0
Reputation: 10709
That sounds like a PyCharm issue, not actually Python. I assume dags
is the root folder for your project. If that's the case, right click on it -> Mark Directory as -> Sources Root
Upvotes: 2