Just running the main.py locally works.
Referencing a sub folder as a module
tree:
- test
- - __init__.py
- - base.py
- main.py
in main.py:
from test import base
def some_function():
base.testFunc()
if __name__ == "__main__":
some_function()
When deploying the function, or when running emulators locally with firebase emulators:start
ModuleNotFoundError: No module named 'test'
When running python main.py everything works as expected
Just running the main.py locally works.
Referencing a sub folder as a module
tree:
- test- - __init__.py- - base.py- main.pyin main.py:
from test import basedef some_function():base.testFunc()if __name__ == "__main__":some_function()When deploying the function, or when running emulators locally with
firebase emulators:startModuleNotFoundError: No module named 'test'When running
python main.pyeverything works as expected