Skip to content

Commit 78a3871

Browse files
authored
Improve logging message for prepare_transport_input script (pypsa-meets-earth#1665)
* fix: Improve logging message for file read failure in download_number_of_vehicles function * fix: Enhance error logging for file read failure in download_number_of_vehicles function
1 parent 1592076 commit 78a3871

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/prepare_transport_data_input.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ def _clean_data(df):
6060
)
6161
print("File read successfully.")
6262
except Exception as e:
63-
logger.warning("Failed to read the file. Falling back on hard-coded data:", e)
63+
logger.warning(
64+
f"Failed to read the file. Falling back on hard-coded data. \nError: {e}"
65+
)
6466
return pd.DataFrame()
6567

6668
vehicles_gho = vehicles_gho.rename(

0 commit comments

Comments
 (0)