https://dagster.io/ logo
Title
m

Ming Fang

04/20/2021, 6:17 PM
I’m following the “Create New Project” steps here https://docs.dagster.io/getting-started/create-new-project and step 3 doesn’t work. Running
dagster-daemon run
resulted in this error
dagster-daemon run
Traceback (most recent call last):
  File "/usr/local/bin/dagster-daemon", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/site-packages/dagster/daemon/cli/__init__.py", line 126, in main
    cli(obj={})  # pylint:disable=E1123
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.9/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/dagster/daemon/cli/__init__.py", line 32, in run_command
    raise Exception(
Exception: dagster-daemon can't run using an in-memory instance. Make sure the DAGSTER_HOME environment variable has been set correctly and that you have created a dagster.yaml file there.
s

sashank

04/20/2021, 6:19 PM
Hey Ming! Does this error show up even after you set
$DAGSTER_HOME
to a directory path and create a
dagster.yaml
in that directory?
m

Ming Fang

04/20/2021, 6:20 PM
The solution is to set
DAGSTER_HOME
IMO it should default to
export DAGSTER_HOME=`pwd`
if it’s not already set
I made the same comment on this issue https://github.com/dagster-io/dagster/issues/3717
oh
dagster.yaml
was not needed for this particular issue; only `DAGSTER_HOME`was needed
s

sashank

04/20/2021, 6:32 PM
That's a good suggestion!
m

Ming Fang

04/20/2021, 6:48 PM
Another problem with the tutorial is the generated sensor and pipeline mode is not compatible.
my_pipeline
has modes
dev
and
test
, but
my_sensor
defaults to mode
default
resulting in run time error
Besides fixing the generated code, I think
dagit
should let me dynamically change the
sensor
mode to match the set of modes in the pipeline
s

sashank

04/20/2021, 6:52 PM
cc @sandy for approachability and tutorial feedback
s

sandy

04/20/2021, 7:40 PM
@alex thoughts on whether we could enable running the daemon without setting dagster_home?
a

alex

04/20/2021, 8:26 PM
it only functions with a consistent instance shared amongst other running components so it requires DAGSTER_HOME
👍 1
m

Ming Fang

04/21/2021, 12:30 AM
I created these two scripts to make running locally.
dagit.sh
#!/usr/bin/env bash
mkdir -p .dagster
export DAGSTER_HOME=`pwd`/.dagster
exec dagit -h 0.0.0.0
dagster-daemon.sh
#!/usr/bin/env bash
mkdir -p .dagster
export DAGSTER_HOME=`pwd`/.dagster
exec dagster-daemon run
Hope this is help to others.