Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dagster_university project incomplete on download #40

Closed
lmdulz opened this issue Dec 19, 2024 · 8 comments
Closed

dagster_university project incomplete on download #40

lmdulz opened this issue Dec 19, 2024 · 8 comments
Assignees

Comments

@lmdulz
Copy link

lmdulz commented Dec 19, 2024

I went through the basic steps of the dagster uni course but encountered the following error when trying to run dagster dev in Lesson 2 2/4.
Before, i just ran the commands from the lesson:
dagster project from-example --example project_dagster_university_start --name dagster_university
cd dagster_university
cp .env.example .env
pip install -e ".[dev]"

Error after that:

`C:\path\to\my\venv\Lib\site-packages\dagster\_core\workspace\context.py:783: UserWarning: Error loading repository location dagster_university:Exception: gRPC server exited with return code 0 while starting up with the command: "C:\path\to\my\venv\Scripts\python.exe -m dagster api grpc --lazy-load-user-code --port 51948 --heartbeat --heartbeat-timeout 20 --fixed-server-id b12a4c80-9b75-41ae-ac28-53e7b2129321 --log-level warning --inject-env-vars-from-instance --instance-ref {"__class__": "InstanceRef", "compute_logs_data": {"__class__": "ConfigurableClassData", "class_name": "LocalComputeLogManager", "config_yaml": "base_dir: C:\\path\to\my\dagster_university\\tmpntlxx672\\storage\n", "module_name": "dagster.core.storage.local_compute_log_manager"}, "custom_instance_class_data": null, "event_storage_data": {"__class__": "ConfigurableClassData", "class_name": "SqliteEventLogStorage", 
"config_yaml": "base_dir: C:\\path\to\my\\dagster_university\\tmpntlxx672\\history\\runs\\\n", "module_name": "dagster.core.storage.event_log"}, "local_artifact_storage_data": {"__class__": "ConfigurableClassData", "class_name": "LocalArtifactStorage", "config_yaml": "base_dir: C:\\path\to\my\dagster_university\\tmpntlxx672\n", "module_name": "dagster.core.storage.root"}, "run_coordinator_data": {"__class__": "ConfigurableClassData", "class_name": "DefaultRunCoordinator", "config_yaml": "{}\n", "module_name": "dagster.core.run_coordinator"}, "run_launcher_data": {"__class__": "ConfigurableClassData", "class_name": "DefaultRunLauncher", "config_yaml": "{}\n", "module_name": "dagster"}, "run_storage_data": {"__class__": "ConfigurableClassData", "class_name": "SqliteRunStorage", "config_yaml": "base_dir: C:\\path\to\my\dagster_university\\tmpntlxx672\\history\\\n", "module_name": "dagster.core.storage.runs"}, "schedule_storage_data": {"__class__": "ConfigurableClassData", "class_name": "SqliteScheduleStorage", "config_yaml": "base_dir: C:\\path\to\my\\dagster_university\\tmpntlxx672\\schedules\n", "module_name": "dagster.core.storage.schedules"}, "scheduler_data": {"__class__": "ConfigurableClassData", "class_name": "DagsterDaemonScheduler", "config_yaml": "{}\n", "module_name": "dagster.core.scheduler"}, "secrets_loader_data": null, "settings": {}, "storage_data": {"__class__": "ConfigurableClassData", "class_name": "DagsterSqliteStorage", "config_yaml": "base_dir: C:\\path\to\my\dagster_university\\tmpntlxx672\n", "module_name": "dagster.core.storage.sqlite_storage"}} --location-name dagster_university -m dagster_university -d C:\IT-Work\Permed\python_project\dagster_university"`

Then I realized, the downloaded project doesnt contain the path \dagster_university\\tmpntlxx672\\storage\ :
grafik

and it also doesnt seem to be a part of this repo.

So is the course deprecated?

I'm sorry if I am wrong here with my question, I'm just quite new to dagster and got the course recommended

@dehume
Copy link
Collaborator

dehume commented Dec 19, 2024

Hello. The course is still active. That tmpgo475x8u directory is created when you run dagster dev which will run Dagster locally. Dagster needs that directory to store certain state based information while it is running. When you end your dagster dev session, that directory will be removed. Because those tmp directories are unique to your local run they are not checked into version control and not part of the repo.

Were you able to successfully install the dependencies?

@lmdulz
Copy link
Author

lmdulz commented Dec 19, 2024

yes, that worked.

i can also access the dagster UI on localhost, the problem really is just, that it cant find the repository location.
On linux the same thing works btw. I am on windows 10 currently, where I need it

@dehume
Copy link
Collaborator

dehume commented Dec 19, 2024

Glad it is working on Linux. What are you using to run the commands on Windows (WSL, cmd.exe)?

@lmdulz
Copy link
Author

lmdulz commented Dec 19, 2024

So far I tried both PowerShell and cmd with the same outcome.

@dehume
Copy link
Collaborator

dehume commented Dec 19, 2024

We did some digging to try and reproduce this on Windows. It might be pip related. It seemed to work fine with uv
https://gist.github.com/cmpadden/e42e3fa1b261f380e96b0e26c60861b1
https://gist.github.com/cmpadden/42962743a5b4d7f0293f4f9b1433b007
Can you try installing the dependencies in a uv virtual env?

@lmdulz
Copy link
Author

lmdulz commented Dec 20, 2024

Hey, thanks for the advice, I tried it and still have the same outcome:

`C:\path\to\my\project>uv venv
Using CPython 3.12.8 interpreter at: C:\Users\me\AppData\Local\Programs\Python\Python312\python.exe
Creating virtual environment at: .venv
Activate with: .venv\Scripts\activate
C:\path\to\my\project>.venv\Scripts\activate
(python_project) C:\path\to\my\project>uv pip install dagster

Resolved 51 packages in 96ms
Installed 51 packages in 4.76s

  • alembic==1.14.0
  • annotated-types==0.7.0
  • antlr4-python3-runtime==4.13.2
  • certifi==2024.12.14
  • charset-normalizer==3.4.0
  • click==8.1.7
  • colorama==0.4.6
  • coloredlogs==14.0
  • croniter==5.0.1
  • dagster==1.9.6
  • dagster-pipes==1.9.6
  • docstring-parser==0.16
  • filelock==3.16.1
  • fsspec==2024.12.0
  • greenlet==3.1.1
  • grpcio==1.68.1
  • grpcio-health-checking==1.68.1
  • humanfriendly==10.0
  • idna==3.10
  • jinja2==3.1.4
  • mako==1.3.8
  • markdown-it-py==3.0.0
  • markupsafe==3.0.2
  • mdurl==0.1.2
  • packaging==24.2
  • protobuf==5.29.2
  • psutil==6.1.1
  • pydantic==2.10.4
  • pydantic-core==2.27.2
  • pygments==2.18.0
  • pyreadline3==3.5.4
  • python-dateutil==2.9.0.post0
  • python-dotenv==1.0.1
  • pytz==2024.2
  • pywin32==308
  • pyyaml==6.0.2
  • requests==2.32.3
  • rich==13.9.4
  • setuptools==75.6.0
  • six==1.17.0
  • sqlalchemy==2.0.36
  • structlog==24.4.0
  • tabulate==0.9.0
  • tomli==2.2.1
  • toposort==1.10
  • tqdm==4.67.1
  • typing-extensions==4.12.2
  • tzdata==2024.2
  • universal-pathlib==0.2.6
  • urllib3==2.2.3
  • watchdog==5.0.3
    (python_project) C:\path\to\my\project>dagster project from-example --example project_dagster_university_start --name dagster_university
    Downloading example 'project_dagster_university_start'. This may take a while.
    Success! Created dagster_university at C:\path\to\my\project\dagster_university/.

(python_project) C:\path\to\my\project>
(python_project) C:\path\to\my\project>cd
dagster_university
(python_project) C:\path\to\my\project\dagster_university>copy .env.example .env
1 Datei(en) kopiert.
(python_project) C:\path\to\my\project\dagster_university>uv pip install -e ".[dev]"
Using Python 3.12.8 environment at: C:\path\to\my\project.venv
Resolved 111 packages in 8.93s
Built dagster-university @ file:///C:/path/to/my/project/dagster_university
Prepared 1 package in 6.38s
Installed 60 packages in 51.72s

  • anyio==4.7.0
  • backoff==2.2.1
  • cffi==1.17.1
  • cryptography==44.0.0
  • dagster-cloud==1.9.6
  • dagster-cloud-cli==1.9.6
  • dagster-duckdb==0.25.6
  • dagster-graphql==1.9.6
  • dagster-university==0.0.0 (from file:///C:/path/to/my/project/dagster_university)
  • dagster-webserver==1.9.6
  • deprecated==1.2.15
  • duckdb==1.1.3
  • geopandas==1.0.1
  • github3-py==4.0.1
  • googleapis-common-protos==1.66.0
  • gql==3.5.0
  • graphene==3.4.3
  • graphql-core==3.2.5
  • graphql-relay==3.2.0
  • h11==0.14.0
  • httptools==0.6.4
  • importlib-metadata==8.5.0
  • iniconfig==2.0.0
  • kaleido==0.2.1
  • multidict==6.1.0
  • numpy==2.2.0
  • opentelemetry-api==1.29.0
  • opentelemetry-exporter-otlp-proto-common==1.29.0
  • opentelemetry-exporter-otlp-proto-grpc==1.29.0
  • opentelemetry-exporter-otlp-proto-http==1.29.0
  • opentelemetry-proto==1.29.0
  • opentelemetry-sdk==1.29.0
  • opentelemetry-semantic-conventions==0.50b0
  • pandas==2.2.3
  • pex==2.27.1
  • plotly==5.24.1
  • pluggy==1.5.0
  • prompt-toolkit==3.0.36
  • propcache==0.2.1
  • pycparser==2.22
  • pyjwt==2.10.1
  • pyogrio==0.10.0
  • pyproj==3.7.0
  • pytest==8.3.4
  • questionary==2.0.1
  • requests-toolbelt==1.0.0
  • shapely==2.0.6
  • shellingham==1.5.4
  • sniffio==1.3.1
  • starlette==0.42.0
  • tenacity==9.0.0
  • typer==0.15.1
  • uritemplate==4.1.1
  • uvicorn==0.34.0
  • watchfiles==1.0.3
  • wcwidth==0.2.13
  • websockets==14.1
  • wrapt==1.17.0
  • yarl==1.18.3
  • zipp==3.21.0
    (python_project) C:\path\to\my\project\dagster_university>dagster dev
    2024-12-20 10:49:13 +0100 - dagster - INFO - Loaded environment variables from .env file: DUCKDB_DATABASE
    2024-12-20 10:49:13 +0100 - dagster - INFO - Using temporary directory C:\path\to\my\project\dagster_university\tmpwap7ltvm for storage. This will be removed when dagster dev exits.
    2024-12-20 10:49:13 +0100 - dagster - INFO - To persist information across sessions, set the environment variable DAGSTER_HOME to a directory to use.
    2024-12-20 10:49:17 +0100 - dagster - INFO - Launching Dagster services...
    2024-12-20 10:49:31 +0100 - dagster-webserver - INFO - Loaded environment variables from .env file: DUCKDB_DATABASE C:\path\to\my\project.venv\Lib\site-packages\dagster_core\workspace\context.py:783: UserWarning: Error loading repository location dagster_university:Exception: gRPC server exited with return code 0 while starting up with the command: "C:\path\to\my\project.venv\Scripts\python.exe -m dagster api grpc --lazy-load-user-code --port 54444 --heartbeat --heartbeat-timeout 20 --fixed-server-id 9f6106cd-0af1-44f9-9590-e878da98b2e0 --log-level warning --inject-env-vars-from-instance --instance-ref {"class": "InstanceRef", "compute_logs_data": {"class": "ConfigurableClassData", "class_name": "LocalComputeLogManager", "config_yaml": "base_dir: C:\path\to\my\project\dagster_university\tmpwap7ltvm\storage\n", "module_name": "dagster.core.storage.local_compute_log_manager"}, "custom_instance_class_data": null, "event_storage_data": {"class": "ConfigurableClassData", "class_name": "SqliteEventLogStorage", "config_yaml": "base_dir: C:\path\to\my\project\dagster_university\tmpwap7ltvm\history\runs\\n", "module_name": "dagster.core.storage.event_log"}, "local_artifact_storage_data": {"class": "ConfigurableClassData", "class_name": "LocalArtifactStorage", "config_yaml": "base_dir: C:\path\to\my\project\dagster_university\tmpwap7ltvm\n", "module_name": "dagster.core.storage.root"}, "run_coordinator_data": {"class": "ConfigurableClassData", "class_name": "DefaultRunCoordinator", "config_yaml": "{}\n", "module_name": "dagster.core.run_coordinator"}, "run_launcher_data": {"class": "ConfigurableClassData", "class_name": "DefaultRunLauncher", "config_yaml": "{}\n", "module_name": "dagster"}, "run_storage_data": {"class": "ConfigurableClassData", "class_name": "SqliteRunStorage", "config_yaml": "base_dir: C:\path\to\my\project\dagster_university\tmpwap7ltvm\history\\n", "module_name": "dagster.core.storage.runs"}, "schedule_storage_data": {"class": "ConfigurableClassData", "class_name": "SqliteScheduleStorage", "config_yaml": "base_dir: C:\path\to\my\project\dagster_university\tmpwap7ltvm\schedules\n", "module_name": "dagster.core.storage.schedules"}, "scheduler_data": {"class": "ConfigurableClassData", "class_name": "DagsterDaemonScheduler", "config_yaml": "{}\n", "module_name": "dagster.core.scheduler"}, "secrets_loader_data": null, "settings": {}, "storage_data": {"class": "ConfigurableClassData", "class_name": "DagsterSqliteStorage", "config_yaml": "base_dir: C:\path\to\my\project\dagster_university\tmpwap7ltvm\n", "module_name": "dagster.core.storage.sqlite_storage"}} --location-name dagster_university -m dagster_university -d C:\path\to\my\project\dagster_university"
    Stack Trace:
    File "C:\path\to\my\project.venv\Lib\site-packages\dagster_core\remote_representation\grpc_server_registry.py", line 188, in _get_grpc_endpoint
    server_process = GrpcServerProcess( ^^^^^^^^^^^^^^^^^^
    File "C:\path\to\my\project.venv\Lib\site-packages\dagster_grpc\server.py", line 1493, in init
    server_process, self.port = _open_server_process_on_dynamic_port( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\path\to\my\project.venv\Lib\site-packages\dagster_grpc\server.py", line 1438, in _open_server_process_on_dynamic_port
    server_process = open_server_process(port=port, socket=None, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\path\to\my\project.venv\Lib\site-packages\dagster_grpc\server.py", line 1413, in open_server_process wait_for_grpc_server(
    File "C:\path\to\my\project.venv\Lib\site-packages\dagster_grpc\server.py", line 1332, in wait_for_grpc_server
    raise Exception(
    warnings.warn(f"Error loading repository location {location_name}:{error.to_string()}")
    2024-12-20 10:49:46 +0100 - dagster.daemon - INFO - Instance is configured with the following daemons: ['AssetDaemon', 'BackfillDaemon', 'SchedulerDaemon', 'SensorDaemon'] `

The error you're encountering in your .txt file is not the same that i get anyways?

@lmdulz
Copy link
Author

lmdulz commented Dec 20, 2024

Okay i found the problem.
As described here i set my no_proxy env variable and that did the trick.

Sorry for getting up all that confusion. Should've probably provided more background info about where I set it up (company environment)

@lmdulz lmdulz closed this as completed Dec 20, 2024
@dehume
Copy link
Collaborator

dehume commented Dec 20, 2024

Glad it all worked out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants