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

fix msgpack serialization to file #396

Merged
merged 2 commits into from
Oct 2, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/power_grid_model/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def msgpack_deserialize_from_file(file_path: Path) -> Dataset:
Returns:
The deserialized dataset in Power grid model input format.
"""
with open(file_path, mode="rb", encoding="utf-8") as file_pointer:
with open(file_path, mode="rb") as file_pointer:
return msgpack_deserialize(file_pointer.read())


Expand All @@ -134,7 +134,7 @@ def msgpack_serialize_to_file(
"""
result = msgpack_serialize(data=data, dataset_type=dataset_type, use_compact_list=use_compact_list)

with open(file_path, mode="wb", encoding="utf-8") as file_pointer:
with open(file_path, mode="wb") as file_pointer:
file_pointer.write(result)


Expand Down