https://dagster.io/ logo
Title
j

Joshua Smart-Olufemi

11/08/2022, 12:05 PM
Hi. When setting up my
dagster.yaml
, in the Compute Log Storage and the Local Artifact Storage sections, for the
base_dir
, do I use a
/
or a
\
for my path directory? My computer automatically uses the backward slash when copying paths but the dagster docs show a forward slash when indicating
base_dir
:dagster-bot-resolve: 1
:dagster: 1
Hi @sean. I realized my mistake with the question you asked, sorry this is my first time trying to adopt dagster to my own personal stack and for career development. Your insight would be greatly appreciated
s

sean

11/08/2022, 3:04 PM
Dagster docs show a
/
because that’s the Unix standard (linux and macOS) whereas windows uses
\
. I’m not very familiar with Windows, but I believe you should be able to use
\
in your
dagster.yaml
if you’re able to use paths with
\
in Python in other contexts.
j

Joshua Smart-Olufemi

11/08/2022, 3:19 PM
I keep running into this specific error
(venv) C:\Users\josh\Desktop\my-dagster-project> dagit
`C:\Users\josh\.virtualenvs\venv\lib\site-packages\dagster\_core\utils.py:88: UserWarning: Found version mismatch between
dagster
(1.0.16)and
dagit
(1.0.15)`
warnings.warn(message)
`C:\Users\josh\.virtualenvs\venv\lib\site-packages\dagster\_core\utils.py:88: UserWarning: Found version mismatch between
dagster
(1.0.16)and
dagster-graphql
(1.0.15)`
warnings.warn(message)
Using temporary directory C:\Users\josh\Desktop\my-dagster-project\tmp8b5_y1pl for storage. This will be removed when dagit exits.
To persist information across sessions, set the environment variable DAGSTER_HOME to a directory to use.
0it [00:00, ?it/s]
0it [00:00, ?it/s]
`C:\Users\josh\.virtualenvs\venv\lib\site-packages\dagster\_core\execution\compute_logs.py:42: UserWarning: WARNING: Compute log capture is disabled for the current environment. Set the environment variable
PYTHONLEGACYWINDOWSSTDIO
to enable.` I don't understand the "using temporoary directory" part because I thought I had already configured that in my
$DAGSTER_HOME/dagster.yaml
file. I am attaching the full work up of the file itself below:
# there are two ways to set storage to SqliteStorage
`# this config manually sets the directory (
base_dir
) for Sqlite to store data in:`
storage:
sqlite:
base_dir: C:\Users\josh\Desktop\my-dagster-project
# and this config grabs the directory from an environment variable
storage:
sqlite:
base_dir:
env: C:\Users\josh\Desktop\my-dagster-project
run_launcher:
module: dagster.core.launcher
class: DefaultRunLauncher
`# Since DefaultRunCoordinator is the default option, omitting the
run_coordinator
key will also suffice,`
# but if you would like to set it explicitly:
run_coordinator:
module: dagster.core.run_coordinator
class: DefaultRunCoordinator
# There are a few ways to configure the QueuedRunCoordinator:
# this first option has concurrency limits set to default values
run_coordinator:
module: dagster.core.run_coordinator
class: QueuedRunCoordinator
# there are two ways to set the directory that the LocalComputeLogManager writes
# stdout & stderr logs to
`# You could directly set the
base_dir
key`
compute_logs:
module: dagster.core.storage.local_compute_log_manager
class: LocalComputeLogManager
config:
base_dir: C:\Users\josh\Desktop\my-dagster-project
# there are two possible ways to configure LocalArtifactStorage
# example local_artifact_storage setup pointing to /var/shared/dagster directory
local_artifact_storage:
module: dagster.core.storage.root
class: LocalArtifactStorage
config:
base_dir: " C:\Users\josh\Desktop\my-dagster-project "
s

sean

11/08/2022, 3:38 PM
Looks like your
DAGSTER_HOME
environment variable is not set, so your
dagster.yaml
is not even being read. I’m not quite sure how to set environment variables in a windows shell, but in unix you could do e.g. this:
$ DAGSTER_HOME=/path/to/my/dagster/home dagit
With the
DAGSTER_HOME
path containing your
dagster.yaml
n

nickvazz

11/08/2022, 4:27 PM
This has worked for me:
$env:DAGSTER_HOME = '/path/to/my/dagster/home'; dagit
j

Joshua Smart-Olufemi

11/08/2022, 5:01 PM
I tried different variations of it but it didn't take. Here's the code
(venv) C:\Users\josh\Desktop\my-dagster-project>$env:DAGSTER_HOME = 'C:\Users\josh\Desktop\my-dagster-project'; dagit
The filename, directory name, or volume label syntax is incorrect.
(venv) C:\Users\josh\Desktop\my-dagster-project>DAGSTER_HOME = 'C:\Users\josh\Desktop\my-dagster-project'; dagit
'DAGSTER_HOME' is not recognized as an internal or external command,
operable program or batch file.
(venv) C:\Users\josh\Desktop\my-dagster-project>env:DAGSTER_HOME = 'C:\Users\josh\Desktop\my-dagster-project'; dagit
The filename, directory name, or volume label syntax is incorrect.
(venv) C:\Users\josh\Desktop\my-dagster-project>
n

nickvazz

11/08/2022, 5:07 PM
Are you in
powershell
or
cmd
? I have only been using powershell
Also I often change all the
\
to
/
since windows listens to linux style paths but linux doesnt like windows
j

Joshua Smart-Olufemi

11/08/2022, 5:08 PM
I'm using cmd
n

nickvazz

11/08/2022, 5:09 PM
if possible, try using powershell as I have found it plays nicer with the python ecosystem
j

Joshua Smart-Olufemi

11/08/2022, 6:51 PM
Do I have to create a new virtual environment in powershell? I ask because I can't activate my cmd environment in powershell even though I have changed it to
/
and used
.\.venv
at the beginning of my environment address
n

nickvazz

11/08/2022, 7:55 PM
You should be able to reuse I would think, does your
venv
folder have a
Scripts/activate.ps1
file? https://stackoverflow.com/a/10030999
j

Joshua Smart-Olufemi

11/08/2022, 8:21 PM
yes, it does
n

nickvazz

11/08/2022, 9:05 PM
Were you able to get the environment to run calling that
.ps1
file instead?
j

Joshua Smart-Olufemi

11/08/2022, 10:22 PM
No.
PS C:\Users\josh\Desktop> Scripts\activate.ps1  Import-Module Scripts
Scripts\activate.ps1 : The module 'Scripts' could not be loaded. For more information, run 'Import-Module Scripts'.
At line:1 char:1
+ Scripts\activate.ps1  Import-Module Scripts
+ ~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (Scripts\activate.ps1:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CouldNotAutoLoadModul
n

nickvazz

11/08/2022, 10:23 PM
where is your
venv
located? I think you would need the full path to the
venv/Scripts/activate.ps1
j

Joshua Smart-Olufemi

11/08/2022, 10:32 PM
I have been able to create the virtual environment finally, thank you for that. But for some reason the snippet of code you gave doesn't run but gives an an error.
PS C:\Users\josh\Desktop> cd toggle_assignment
PS C:\Users\josh\Desktop\toggle_assignment> cd assignment
PS C:\Users\josh\Desktop\toggle_assignment\assignment> cd venv
PS C:\Users\josh\Desktop\toggle_assignment\assignment\venv> Scripts\activate.ps1
(venv) PS C:\Users\josh\Desktop\toggle_assignment\assignment\venv> $env:DAGSTER_HOME = 'C:/Users/josh/Desktop/my-dagster-project'; dagit
Fatal error in launcher: Unable to create process using '"C:\Users\josh\Desktop\toggle assignment\assignment\venv\Scripts\python.exe"  "C:\Users\josh\Desktop\toggle_assignment\assignment\venv\Scripts\dagit.exe" ': The system cannot find the file specified.
(venv) PS C:\Users\josh\Desktop\toggle_assignment\assignment\venv> cd ..
(venv) PS C:\Users\josh\Desktop\toggle_assignment\assignment> cd ..
(venv) PS C:\Users\josh\Desktop\toggle_assignment> cd ..
(venv) PS C:\Users\josh\Desktop> cd my-dagster-project
(venv) PS C:\Users\josh\Desktop\my-dagster-project> $env:DAGSTER_HOME = 'C:/Users/josh/Desktop/my-dagster-project'; dagit
Fatal error in launcher: Unable to create process using '"C:\Users\josh\Desktop\toggle assignment\assignment\venv\Scripts\python.exe"  "C:\Users\josh\Desktop\toggle_assignment\assignment\venv\Scripts\dagit.exe" ': The system cannot find the file specified.
(venv) PS C:\Users\josh\Desktop\my-dagster-project> $env:DAGSTER_HOME = 'C:/Users/josh/Desktop/my-dagster-project'; dagit
Fatal error in launcher: Unable to create process using '"C:\Users\josh\Desktop\toggle assignment\assignment\venv\Scripts\python.exe"  "C:\Users\josh\Desktop\toggle_assignment\assignment\venv\Scripts\dagit.exe" ': The system cannot find the file specified.
(venv) PS C:\Users\josh\Desktop\my-dagster-project>
n

nickvazz

11/08/2022, 10:44 PM
is there any chance that this is the wrong
venv
and
dagit
isnt installed? Looks like there is something weird going on with it trying to resolve
dagit
Also, if you use three
around something
, it will turn into:
this instead 
with multiple lines
instead of using a single
around something
then you end up with
something weird like this
j

Joshua Smart-Olufemi

11/08/2022, 10:46 PM
So I was able to resolve the error above. I ran it again and got this though
PS C:\Users\josh\Desktop\toggle assignment> cd assignment
PS C:\Users\josh\Desktop\toggle assignment\assignment> cd venv
PS C:\Users\josh\Desktop\toggle assignment\assignment\venv> Scripts\activate.ps1
(venv) PS C:\Users\josh\Desktop\toggle assignment\assignment\venv> $env:DAGSTER_HOME = 'C:/Users/josh/Desktop/my-dagster-project'; dagit
C:\Users\josh\Desktop\toggle assignment\assignment\venv\lib\site-packages\dagster\_core\instance\config.py:37: UserWarning: No dagster instance configuration file (dagster.yaml) found at C:/Users/josh/Desktop/my-dagster-project. Defaulting to loading and storing all metadata with C:/Users/josh/Desktop/my-dagster-project. If this is the desired behavior, create an empty dagster.yaml file in C:/Users/josh/Desktop/my-dagster-project.
warnings.warn(
0it [00:00, ?it/s]
0it [00:00, ?it/s]
Usage: dagit [OPTIONS]
Try 'dagit --help' for help.
Error: No arguments given and workspace.yaml not found.
(venv) PS C:\Users\josh\Desktop\toggle assignment\assignment\venv>
This error is weird ebcause I configured my dagster.yaml in my vscode and the file is saved under the "my-dagster-project" file
Now it says (
venv) PS C:\Users\josh\Desktop\toggle assignment\assignment\venv> $env:DAGSTER_HOME = 'C:/Users/josh/Desktop/my-dagster-project'; dagit
Usage: dagit [OPTIONS]
Try 'dagit --help' for help.
Error: No arguments given and workspace.yaml not found.
(venv) PS C:\Users\josh\Desktop\toggle assignment\assignment\venv>
. I moved my
dagster.yaml
file out of
$DAGSTER_HOME
in the image above because the previous error stated there needed to be an empty dagster.yaml file in the my-dagster-project folder. Now, after doing that, it is saying my workpsace.yaml file is not found but it is right there in the my-dagster-project folder. I then re-arranged my file directory to point to the actual folder where dagster is installed and got this
(venv) PS C:\Users\josh\Desktop> cd my-dagster-project
(venv) PS C:\Users\josh\Desktop\my-dagster-project>  $env:DAGSTER_HOME = 'C:/Users/josh/Desktop/my-dagster-project'; dagit
C:\Users\josh\Desktop\toggle assignment\assignment\venv\lib\site-packages\dagster\_core\execution\compute_logs.py:42: UserWarning: WARNING: Compute log capture is disabled for the current environment. Set the environment variable PYTHONLEGACYWINDOWSSTDIO to enable.
warnings.warn(WIN_PY36_COMPUTE_LOG_DISABLED_MSG)
Telemetry:
As an open source project, we collect usage statistics to inform development priorities. For more
information, read <https://docs.dagster.io/install#telemetry>.
We will not see or store solid definitions, pipeline definitions, modes, resources, context, or
any data that is processed within solids and pipelines.
To opt-out, add the following to $DAGSTER_HOME/dagster.yaml, creating that file if necessary:
telemetry:
enabled: false
Welcome to Dagster!
If you have any questions or would like to engage with the Dagster team, please join us on Slack
(<https://bit.ly/39dvSsF>).
2022-11-08 23:59:48 +0100 - dagit - INFO - Serving dagit on <http://127.0.0.1:3000> in process 27080
Do I need to worry about this part of the resulting message `C:\Users\josh\Desktop\toggle assignment\assignment\venv\lib\site-packages\dagster\_core\execution\compute_logs.py:42: UserWarning: WARNING: Compute log capture is disabled for the current environment. Set the environment variable
PYTHONLEGACYWINDOWSSTDIO
to enable.`
warnings.warn(WIN_PY36_COMPUTE_LOG_DISABLED_MSG)
?
n

nickvazz

11/08/2022, 11:52 PM
I added that environment variable (which in your case would maybe look like
$env:DAGSTER_HOME = 'C:/Users/josh/Desktop/my-dagster-project'; $env:PYTHONLEGACYWINDOWSSTDIO 1; dagit
) but i think that just makes it so that logs you have coming from your own code are added to the dagster logging (could be wrong through)
j

Joshua Smart-Olufemi

11/09/2022, 7:09 PM
I ran the code but still got an error
(venv) PS C:\Users\josh\Desktop\my-dagster-project> $env:DAGSTER_HOME = 'C:/Users/josh/Desktop/my-dagster-project'; $env:PYTHONLEGACYWINDOWSSTDIO 1; dagit
At line:1 char:95
+ ... h/Desktop/my-dagster-project'; $env:PYTHONLEGACYWINDOWSSTDIO 1; dagit
+                                                                  ~
Unexpected token '1' in expression or statement.
+ CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnexpectedToken
s

sean

11/09/2022, 7:11 PM
I think you’re missing an
=
between
PYTHONLEGACYWINDOWSSTDIO
and
1
?
j

Joshua Smart-Olufemi

11/09/2022, 7:13 PM
Yeah, I just did that now and it ran, I was about to text you when you responded. Thank you @sean and @nickvazz!!! I'm really grateful for the help and the patience to walk me through this.
s

sean

11/09/2022, 7:15 PM
Great that it’s working! For future reference, like @nickvazz mentioned above, consider creating
code in code blocks
like this
Using “```” instead of the inline code style used throughout this thread-- makes it easier to read and help you
j

Joshua Smart-Olufemi

11/09/2022, 7:18 PM
Got it, thank you both again for helping me through this. I am grateful
:next-level-daggy: 1