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

Update build_powerplants.py #1242

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update build_powerplants.py
The error I mentioned here "https://discord.com/channels/911692131440148490/1316036197335961640". It is due to non-ASCII letter that it struggles to encode.
So I forced the script to read the file as UTF-8 (Line 303). And it worked for me.
milyas009 authored Dec 16, 2024
commit e0c4a9d7824edbda3631a4d7698a0c161ab6498d
2 changes: 1 addition & 1 deletion scripts/build_powerplants.py
Original file line number Diff line number Diff line change
@@ -300,7 +300,7 @@ def replace_natural_gas_technology(df: pd.DataFrame):

configure_logging(snakemake)

with open(snakemake.input.pm_config, "r") as f:
with open(snakemake.input.pm_config, "r", encoding="utf-8") as f:
config = yaml.safe_load(f)

filepath_osm_ppl = snakemake.input.osm_powerplants