gm! I have a config.py file that contains database...
# ask-community
k
gm! I have a config.py file that contains database secrets. When I try to run a simple asset (
historical marketcap
) Im getting the following error
Copy code
dagster._core.errors.DagsterImportError: Encountered ImportError: `No module named 'config'` while importing module data. Local modules were resolved using the working directory `/opt/dagster/app`. If another working directory should be used, please explicitly specify the appropriate path using the `-d` or `--working-directory` for CLI based targets or the `working_directory` configuration option for workspace targets.
where's the best place to keep a config file to be shared across multiple jobs or assets?
should I just use a
.env file
?
s
What is the command line that you used to run dagster/dagit? It looks like you might need to specify a working directory.
k
Right now, ive just been using the UI to do it. Im really just getting used to the workflow and getting a basic example working. Can you link documentation for. specifying the working directory?
or should I just include a resources.py file?
s
Hi Kevin, if you look at the error you can see that the working directory
/opt/dagster/app
is being used, but from your image,
config.py
is not in this directory-- it’s inside another python package (
assets
). It’s hard to say more without knowing more about your filesystem layout, but I’m guessing that
import assets.config
might resolve correctly.