From 396e6dbe122eca9c62560344c98bc6e8b2796868 Mon Sep 17 00:00:00 2001 From: Robert John Date: Fri, 18 Oct 2024 20:50:05 +0200 Subject: [PATCH] improve logging; ensure kba path is string to replace --- src/egon/data/datasets/ch4_storages.py | 2 ++ .../datasets/emobility/motorized_individual_travel/helpers.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/egon/data/datasets/ch4_storages.py b/src/egon/data/datasets/ch4_storages.py index b9dad9328..db8407a15 100755 --- a/src/egon/data/datasets/ch4_storages.py +++ b/src/egon/data/datasets/ch4_storages.py @@ -99,6 +99,8 @@ def import_installed_ch4_storages(scn_name): target_file = os.path.dirname(os.path.abspath(__file__)) print("0 target_file", target_file) + for segment in target_file.split(os.sep): + print(segment) target_file = os.path.join(target_file, "gas_data", "data", "IGGIELGN_Storages.csv") print("1 target_file", target_file) diff --git a/src/egon/data/datasets/emobility/motorized_individual_travel/helpers.py b/src/egon/data/datasets/emobility/motorized_individual_travel/helpers.py index 59913501a..e2c8b1754 100644 --- a/src/egon/data/datasets/emobility/motorized_individual_travel/helpers.py +++ b/src/egon/data/datasets/emobility/motorized_individual_travel/helpers.py @@ -91,6 +91,8 @@ def read_kba_data(year=None): "sources"]["KBA"]["file_processed"] if year: try: + print("p", p, "type p", type(p)) + p = str(p) p.replace("YEAR", "2020") return pd.read_csv(p) except Exception as E: