Skip to content

Commit b9982a4

Browse files
committed
Skip segments with empty trkseg
1 parent b6cf142 commit b9982a4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/stravavis/process_data.py

+3
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ def process_gpx(gpxfile: str) -> pd.DataFrame | None:
3838

3939
for activity_track in activity.tracks:
4040
for segment in activity_track.segments:
41+
if not activity.tracks[0].segments[0].points:
42+
continue
43+
4144
x0 = activity.tracks[0].segments[0].points[0].longitude
4245
y0 = activity.tracks[0].segments[0].points[0].latitude
4346
d0 = 0

0 commit comments

Comments
 (0)