Charles
06/27/2022, 10:21 AMdagster_home
called my_project
however I get the following error: Exception: Can not import module dagster from path ./dagster_home/my_project/dagster, unable to load spec.
Here's the location YAML I've defined via Cloud UI:
location_name: my_project
code_source:
python_file: ./dagster_home/my_project/dagster
What am I missing?daniel
06/27/2022, 2:35 PMpackage_name
rather than python_file
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 python -m <your folder>
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.Charles
06/27/2022, 2:41 PMEvery code location must set theBut it's not clear to me what kind of file Dagster is looking for? ie; should thekey to eithercode_source:
orpython_file:
to specify where to find your code.package_name:
.py
file reference a resopository
object such as this one? Or something else?daniel
06/27/2022, 2:42 PMCharles
06/27/2022, 2:43 PMdaniel
06/27/2022, 3:55 PM