Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initialize from_start_to_end with None #262

Merged
merged 1 commit into from
Jul 8, 2023
Merged

Conversation

lbenedix
Copy link
Contributor

@lbenedix lbenedix commented Jul 2, 2023

No description provided.

@lbenedix
Copy link
Contributor Author

lbenedix commented Jul 2, 2023

This makes the function explode

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<gpx>
  <trk>
    <trkseg>
      <trkpt lon="8.354584" lat="51.481570">
      </trkpt>
      <trkpt lon="8.354575" lat="51.481573">
      </trkpt>
      <trkpt lon="8.354575" lat="51.481573">
      </trkpt>
    </trkseg>
  </trk>
</gpx>
  File "/usr/lib/python3/dist-packages/gpxpy/gpx.py", line 1112, in <listcomp>
    return [(distance / from_start_to_end) if from_start_to_end else 0
NameError: free variable 'from_start_to_end' referenced before assignment in enclosing scope

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants