I have looked at so many questions exactly like this but none of the solutions work its infuriating.
I want to call methods in a class in python that exist in a different module.
I have added init.py to each directory.
Structure:
server
database
- __init.py
- mongo.py
rabbit
- _init_py
- worker.py
In worker.py I import mongo as such:
from database import mongo
I then get the error 'No module named 'database' at runtime.
Please somebody explain, thanks!