diff --git a/src/train_detail.py b/src/train_detail.py index 6a2599e..344ebed 100644 --- a/src/train_detail.py +++ b/src/train_detail.py @@ -60,8 +60,10 @@ def create_crs_list_from_stops(stops): for stop in stops: if not stop['isPublic']: continue - - loc_ref = ob_client.get_loc_ref_codes_by_tiploc(stop['tiploc']) - - crs_list.append(loc_ref[0]['3ALPHA']) + try: + loc_ref = ob_client.get_loc_ref_codes_by_tiploc(stop['tiploc']) + crs_list.append(loc_ref[0]['3ALPHA']) + except Exception as e: + print("Unable to load 3ALPHA for: ", stop['tiploc']) + crs_list.append("---") return crs_list \ No newline at end of file