Skip to content

Commit

Permalink
trying to quote status in right way, for df.execute_sql, e.g. "'statu…
Browse files Browse the repository at this point in the history
…s2019'"
  • Loading branch information
Robert John committed Jan 22, 2025
1 parent c0182f0 commit e2136d8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/egon/data/datasets/osmtgmod/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,15 @@ def to_pypsa():

# for scenario_name in ["'eGon2035'", "'eGon100RE'", "'status2019'"]:
# for scenario_name in config.settings()["egon-data"]["--scenarios"]:
for scenario_name in settings()["egon-data"]["--scenarios"]:
scenario_names = settings()["egon-data"]["--scenarios"]
print(f"All scenario names are {scenario_names}")
for scenario_name_ix, scenario_name in enumerate(scenario_names):

scenario_name = "'" + scenario_name + "'"

print(f"running scenario_name_ix {scenario_name_ix}: scenario_name: {scenario_name}"
f" of alL scenario_names: {scenario_names}")

capital_cost = get_sector_parameters(
"electricity", scenario_name.replace("'", "")
)["capital_cost"]
Expand Down

0 comments on commit e2136d8

Please sign in to comment.