File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,7 +25,13 @@ def __init__(
2525 num_processes : T .Optional [int ] = None ,
2626 ):
2727 super ().__init__ ()
28- tracks = parse_gpx (source_path )
28+ try :
29+ tracks = parse_gpx (source_path )
30+ except Exception as ex :
31+ raise RuntimeError (
32+ f"Error parsing GPX { source_path } : { ex .__class__ .__name__ } : { ex } "
33+ )
34+
2935 if 1 < len (tracks ):
3036 LOG .warning (
3137 "Found %s tracks in the GPX file %s. Will merge points in all the tracks as a single track for interpolation" ,
Original file line number Diff line number Diff line change @@ -20,7 +20,13 @@ def extract_points(self) -> T.Sequence[geo.Point]:
2020 if not path :
2121 return []
2222
23- gpx_tracks = geotag_images_from_gpx_file .parse_gpx (path )
23+ try :
24+ gpx_tracks = geotag_images_from_gpx_file .parse_gpx (path )
25+ except Exception as ex :
26+ raise RuntimeError (
27+ f"Error parsing GPX { path } : { ex .__class__ .__name__ } : { ex } "
28+ )
29+
2430 if 1 < len (gpx_tracks ):
2531 LOG .warning (
2632 "Found %s tracks in the GPX file %s. Will merge points in all the tracks as a single track for interpolation" ,
You can’t perform that action at this time.
0 commit comments