https://dagster.io/ logo
#ask-community
Title
# ask-community
r

Roel Hogervorst

04/13/2022, 12:04 PM
I need some help figuring out what I do wrong with
load_from
package in the workspace:
Copy code
load_from:
  - python_package:
      package_name: work
Here is my overview of a folder (I copied this setup from how dagster/examples/dbt_example was set up
Copy code
├── README.md
├── __init__.py
├── logs
├── setup.py
├── work
|	├── README.md
|	├── jobs
|	├── ops
|	├── repo.py
|	├── resources
|	└── sql
├── work_dbt
├── work_tests
└── workspace.yaml
In this rootfolder is a setup.py like so:
Copy code
from setuptools import setup

setup(
    name="work",
    version="0+dev",
    author="Roel",
    classifiers=[
        "Programming Language :: Python :: 3.6",
        "Programming Language :: Python :: 3.7",
        "Programming Language :: Python :: 3.8",
        "Programming Language :: Python :: 3.9",
        "Operating System :: OS Independent",
    ],
    packages=["work"],
    install_requires=[
        "dagit==0.14.7",
        "dagster==0.14.7",
        "dagster-dbt==0.14.7",
        "SQLAlchemy==1.4.35"
        ]
)
I have a venv into which I installed dagit and dagster components. and I also installed this setup.py with
pip install -e .
The process indeed checks if the dagster packages are there, and finishes. However, when I start dagit from the rootfolder I get the following error:
Copy code
UserWarning: Error loading repository location work:dagster.core.errors.D
agsterInvariantViolationError: No jobs, pipelines, graphs, asset collections, or repositories found
in "work".
I don't get it, why doesn't this work? If I point directly to repo.py it just works. Why does this package setup not work?
j

johann

04/13/2022, 12:38 PM
r

Roel Hogervorst

04/13/2022, 12:41 PM
Oh, let me try
damn, I did not look into the
__init__.py
file in the example!
Thanks!
2 Views