Skip to content

Commit 29dfac8

Browse files
committed
Avoid errors when storing event names in cross calibration output
1 parent 6cf05f5 commit 29dfac8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

climada/util/calibrate/cross_calibrate.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,10 @@ def event_info_from_input(input: Input) -> Dict[str, Any]:
6161
region_ids = data.columns
6262

6363
# Get event name
64-
event_names = input.hazard.select(event_id=event_ids.to_list()).event_name
64+
try:
65+
event_names = input.hazard.select(event_id=event_ids.to_list()).event_name
66+
except Exception:
67+
event_names = []
6568

6669
# Return data
6770
return {

0 commit comments

Comments
 (0)