Charles06/27/2022, 10:21 AM
however I get the following error:
Here's the location YAML I've defined via Cloud UI:
Exception: Can not import module dagster from path ./dagster_home/my_project/dagster, unable to load spec.
What am I missing?
location_name: my_project code_source: python_file: ./dagster_home/my_project/dagster
daniel06/27/2022, 2:35 PM
as your key. the first thing I would try is renaming your folder to something other than dagster, as I've seen python get very confused when determining if an import was a local module with the same name as an installed module (for example, you'll often have a bad time if you try to load a file called random.py or math.py since those are built-in python packages). The next thing I'd try is seeing whether running 'python ./dagster_home/my_project/dagster' (or whatever the new filename is) - or
if it's a folder/python module) is able to run your code without any issues, that will typically surface any import-related issues which seems to be what's happening here.
python -m <your folder>
Charles06/27/2022, 2:41 PM
Every code location must set theBut it's not clear to me what kind of file Dagster is looking for? ie; should thekey to either
python_file:to specify where to find your code.
file reference a
object such as this one? Or something else?
daniel06/27/2022, 2:42 PM
Charles06/27/2022, 2:43 PM
daniel06/27/2022, 3:55 PM