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

DRI production variable not contained in public Ariadne1 database #29

Open
cpschau opened this issue Jan 10, 2025 · 0 comments
Open

DRI production variable not contained in public Ariadne1 database #29

cpschau opened this issue Jan 10, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@cpschau
Copy link
Contributor

cpschau commented Jan 10, 2025

Using the open data of Ariadne1, build_scenarios throws an error in get_DRI_share as the variable Production|Steel|Primary|Direct Reduction Hydrogen does not exist within the public database. Weirdly, handling the error using try and except clauses did not work. An if-else clause would be required instead. Therefore, it might make sense to also replace the other try-except statements in the script.

Error Message

KeyError: 'Production|Steel|Primary|Direct Reduction Hydrogen'

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

Traceback (most recent call last):
  File "/scratch/htc/cschauss/pypsa-ariadne/.snakemake/scripts/tmppkkd_cud.build_scenarios.py", line 251, in <module>
    write_to_scenario_yaml(input, output, scenarios, df)
  File "/scratch/htc/cschauss/pypsa-ariadne/.snakemake/scripts/tmppkkd_cud.build_scenarios.py", line 200, in write_to_scenario_yaml
    dri_fraction = get_DRI_share(
                   ^^^^^^^^^^^^^^
  File "/scratch/htc/cschauss/pypsa-ariadne/.snakemake/scripts/tmppkkd_cud.build_scenarios.py", line 63, in get_DRI_share
    DRI_steel = df.loc[model, "Production|Steel|Primary|Direct Reduction Hydrogen"]
@cpschau cpschau added the bug Something isn't working label Jan 10, 2025
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

1 participant