I believe the problem is running the code not importing, as IntelliCode recognizes the module and functions
So here is the structure of my files
-a.py
-tests/
-__init__.py
-b.py
-pages/
-__init__.py
-c.py
Here is c.py
from tests import b
def hello_from_c():
print('C says hi')
Here is b.py
import pages.c as c
c.hello_from_c()
When I run 'python a.py' in terminal with either b or c imported it runs fine. However, when I run either c or b in terminal as a script, trying to import the other file, I get 'no module named tests' or 'no module named pages'. Even though IntelliCode is showing no errors.
What's the reason this is happening?
(Update)
running python -m [packagename].[filename(no .py)]
works