Basil V10/13/2020, 8:19 PM
error when I try to run Dagit. I recently upgraded my project to use the
ModuleNotFoundError: No module named '<my_module>'
structure. I can provide more details but does anyone have an idea what may be causing the issue?
daniel10/13/2020, 8:23 PM
Basil V10/13/2020, 8:24 PM
and my workspace.yaml file contains:
top_level_project_folder my_module __init__.py repo.py workspace.yaml
load_from: - python_module: module_name: my_module.repo attribute: my_repository
from the same directory as
. I've tried importing/running
in the same directory and
is a function in my_module/repo.py decorated with @repository
used in the
file—which one is correct? (currently tried both and getting same error)
from inside a pipenv shell
alex10/13/2020, 8:32 PM
so since you depend on working directory to load the module, you may be best off using
prha10/13/2020, 8:33 PM
expect the specified package to be installed
Basil V10/13/2020, 8:36 PM
I get this error:
ImportError: `attempted relative import with no known parent package` while importing module repo from file /path/to/my_module/repo.py. Consider using the module-based options `-m` for CLI-based targets or the `python_package` workspace.yaml target.
in this case:
I don't understand where I'm going wrong I feel like I've paralleled the examples in your docs pretty closely.
load_from: - python_file: relative_path: my_module/repo.py attribute: my_repository
prha10/13/2020, 8:44 PM
Basil V10/13/2020, 8:47 PM
prha10/13/2020, 8:49 PM
to do an editable install for local development
pip install -e path/to/module
attempted relative import with no known parent package
Basil V10/13/2020, 8:52 PM
so I have my own module as a dependency for my project? How does that translate when I move things to production?
pipenv install -e path/to/module
prha10/13/2020, 8:53 PM
to resolve these headaches, but any change to code loading results in some breaking changes so we’re reluctant to do that in one of the weekly releases.
Basil V10/13/2020, 8:59 PM