https://dagster.io/ logo
#ask-community
Title
# ask-community
v

Vyom Raj

08/10/2023, 5:08 AM
Hi everyone. I am trying this tutorial on my windows system. https://docs.dagster.io/integrations/dbt/using-dbt-with-dagster/load-dbt-models and tried to run this DAGSTER_DBT_PARSE_PROJECT_ON_LOAD=1 dagster dev and facing an error. Is there a way to solve this?
Copy code
(dagster) C:\Users\rajv\dev\tutorial-dbt-dagster\jaffle_shop\jaffle_dagster>DAGSTER_DBT_PARSE_PROJECT_ON_LOAD=1 dagster dev
'DAGSTER_DBT_PARSE_PROJECT_ON_LOAD' is not recognized as an internal or external command,
operable program or batch file.
dagster bot responded by community 1
🤖 1
also i see this error on running dagster dev.
Copy code
(dagster) C:\Users\rajv\dev\tutorial-dbt-dagster\jaffle_shop\jaffle_dagster>dagster dev
2023-08-10 00:10:55 -0500 - dagster - INFO - Using temporary directory C:\Users\rajv\dev\tutorial-dbt-dagster\jaffle_shop\jaffle_dagster\tmp5yl_eku7 for storage. This will be removed when dagster dev exits.
2023-08-10 00:10:55 -0500 - dagster - INFO - To persist information across sessions, set the environment variable DAGSTER_HOME to a directory to use.
2023-08-10 00:10:56 -0500 - dagster - INFO - Launching Dagster services...
2023-08-10 00:11:00 -0500 - dagster.code_server - ERROR - Error while importing code
Traceback (most recent call last):
  File "C:\Users\rajv\Miniconda3\envs\dagster\lib\site-packages\dagster\_core\code_pointer.py", line 135, in load_python_module
    return importlib.import_module(module_name)
  File "C:\Users\rajv\Miniconda3\envs\dagster\lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'jaffle_dagster'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\rajv\Miniconda3\envs\dagster\lib\site-packages\dagster\_grpc\server.py", line 290, in __init__
    self._loaded_repositories: Optional[LoadedRepositories] = LoadedRepositories(
  File "C:\Users\rajv\Miniconda3\envs\dagster\lib\site-packages\dagster\_grpc\server.py", line 134, in __init__
    loadable_targets = get_loadable_targets(
  File "C:\Users\rajv\Miniconda3\envs\dagster\lib\site-packages\dagster\_grpc\utils.py", line 47, in get_loadable_targets
    else loadable_targets_from_python_module(module_name, working_directory)
  File "C:\Users\rajv\Miniconda3\envs\dagster\lib\site-packages\dagster\_core\workspace\autodiscovery.py", line 35, in loadable_targets_from_python_module
prior to that this is also what i saw
Copy code
(dagster) C:\Users\rajv\dev\tutorial-dbt-dagster\jaffle_shop>dagster-dbt project scaffold --project-name jaffle_dagster
...
TemplateNotFound: scaffold\definitions.py.jinja

(dagster) C:\Users\rajv\dev\tutorial-dbt-dagster\jaffle_shop>
looks like i am running into this issue. https://github.com/dagster-io/dagster/issues/15730
y

Yepher

08/10/2023, 5:06 PM
It has been a long time since I used Windows but aren't variables defined something like this on Windows?
%DAGSTER_DBT_PARSE_PROJECT_ON_LOAD%=1
?
v

Vyom Raj

08/10/2023, 7:48 PM
i could get that to work without the actual environment by directly running dagster dev. Thanks @Yepher