Hello! I tried to update our way of defining a <c...
# ask-community
l
Hello! I tried to update our way of defining a code location using Definitions instead of repository. I have a module name
pipelines
with: • one asset (define as decorated function), • one job (defined through
define_asset_job
), • one sensor triggering the asset (defined as decorated function), • and an
__init__.py
at the module root containing the following code:
Copy code
from dagster import Definitions
from pipelines.core.resources.my_resource import my_resource
from pipelines.my_folder.job import my_job
from pipelines.my_folder.sensors import my_sensor
from pipelines.my_folder.assets import my_asset

defs = Definitions(
    assets=[my_asset],
    schedules=[],
    jobs=[my_job],
    sensors=[my_sensor],
    resources={'my_resource': my_resource}
)
I then start
dagster dev -m my_module
Everything works correctly and seeing the log I can say that my sensor and job are being triggered. But there are numerous pages inside dagit that contains errors looking like the ones attached. Do you know what could I have done wrong ? Is it a known bug (I have seen another person mention the same a month ago) ? Thank you by advance and have a nice day!
🤖 1
The error:
Also I do see my module being loaded properly:
For anyone passing by here, I found the issue. If you name your package
pipelines
, there’s an error in the front end. Dagit URLs look like this
Copy code
<http://127.0.0.1:3000/locations/><module_name>/jobs/<job_name>
If your module is named
pipelines
, legacy code here, will try to find a “pipeline” called “jobs” which probably doesn’t exists, which gives you this error. Just rename your package 🙂
s
Thanks for finding this and filing an issue 🙏
👀 1