Commit 5459d05b authored by Eric Duminil's avatar Eric Duminil
Browse files

Better error message

parent 64f859f4
......@@ -20,7 +20,7 @@ class EnergyGridResults(SimStadtResults):
def _parse_results(self) -> pd.DataFrame:
jsons = self.get_all_by_extension(".json")
assert len(jsons) == 1
assert len(jsons) == 1, f"Exactly one JSON file should have been written: {len(jsons)} were found."
json_output = jsons[0]
with open(json_output, encoding="utf-8") as out:
content = json.load(out)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment