Bug: `free variable 'from_start_to_end' referenced before assignment in enclosing scope`
martinlehoux opened this issue · 1 comments
martinlehoux commented
GPXpy: 1.4.2
Python: 3.8.3
Issue
I ran the following line:
gpx = gpxpy.parse(self.source_file.open())
and encountered the following issue:
free variable 'from_start_to_end' referenced before assignment in enclosing scope
Ideas
The following line seems to have an issue (at least I ran into one):
Line 1112 in e3733bb
The few lines above do not define from_start_to_end
when dist
is falsy
dist = interval[-1].distance_3d(end)
if dist:
from_start_to_end = distances[-1] + dist
Maybe default to 0 ?
martinlehoux commented
Here is the failing track, I can open it successfully in gnome-maps
track.zip