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

--scenarios Parameter Causes Broken DAGs #343

Open
khelfen opened this issue Nov 21, 2024 · 2 comments
Open

--scenarios Parameter Causes Broken DAGs #343

khelfen opened this issue Nov 21, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@khelfen
Copy link

khelfen commented Nov 21, 2024

Description

Using the CLI parameter --scenarios results in broken DAGs due to incorrect conversion of the parameter into egon-data.configuration.yaml. This causes the following error:

Error Message

Broken DAG: [.../eGon-data/SH1/code/src/egon/data/airflow/dags/pipeline.py]
Traceback (most recent call last):
  File "<string>", line 7, in __init__
  File ".../code/src/egon/data/datasets/__init__.py", line 277, in __post_init__
    last = list(self.tasks.last)[0]
IndexError: list index out of range

Cause

The parameter --scenarios is being incorrectly written into the YAML file as:

--scenarios: '[''status2019'', ''eGon2035'']'

Expected Behavior

The parameter should be correctly translated into YAML as:

--scenarios:
- status2019
- eGon2035

Steps to Reproduce

  1. Use the CLI to run a scenario.
  2. Observe the resulting YAML and notice the incorrect format.
  3. Try to run the pipeline and observe the broken DAG error.

Impact

  • The pipelines are unable to execute due to invalid configurations.
  • Manual correction of the YAML file is required as a workaround.

Proposed Solution

Adjust the conversion logic to ensure the --scenarios parameter is written into the YAML file in the correct format.

@khelfen khelfen added the bug Something isn't working label Nov 21, 2024
@ClaraBuettner
Copy link

I have not started a new run for a couple of months, but I remember that we once had similar problems.
@CarlosEpia: Do you know if that was fixed?

@CarlosEpia
Copy link

I think we faced that problem at some point. Since we always work with powerd-data by creating the egon-data.configuration.yaml in advance, the required changes were probably never done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants