Skip to content

No Module Named when Referencing local packages (folders)  #92

Closed
@EmanuelU

Description

@EmanuelU

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions