From f5b6255f19433ac6db62658f24da73f62192c810 Mon Sep 17 00:00:00 2001 From: Daniel Schadt Date: Sat, 1 Nov 2025 14:09:25 +0100 Subject: don't choke if no GPX timestamps are set This usually happens in synthetic tracks, which we still want to load correctly. --- fietsboek/convert.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fietsboek/convert.py b/fietsboek/convert.py index 04c7e73..7815ef4 100644 --- a/fietsboek/convert.py +++ b/fietsboek/convert.py @@ -78,7 +78,10 @@ def from_gpx(data: bytes) -> Track: if start_time is None: start_time = point.time - time_offset = (point.time - start_time).total_seconds() + if point.time is not None and start_time is not None: + time_offset = (point.time - start_time).total_seconds() + else: + time_offset = 0 points.append(geo.Point( longitude=point.longitude, latitude=point.latitude, -- cgit v1.2.3