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

Crash when using GPX file #20

Closed
tve opened this issue Feb 17, 2022 · 2 comments
Closed

Crash when using GPX file #20

tve opened this issue Feb 17, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@tve
Copy link

tve commented Feb 17, 2022

I converted a garmin fit to gpx using gpsbabel and gopro-dashboard crashes:

$ gopro-dashboard.py --layout xml --layout-xml tve-2704x1520.xml --gpx 20220215141226.gpx GH010132.MP4 GH010132-ov.mp4
Input file has size Dimension(x=2704, y=1520)
Timer(loading timeseries - Called: 1, Total: 0.47362, Avg: 0.47362, Rate: 2.11)
GoPro Timeseries has 1273 data points
Timer(program - Called: 1, Total: 1.70522, Avg: 1.70522, Rate: 0.59)
Traceback (most recent call last):
  File "/home/tve/Projects/Navigation/gopro-overlay/bin/gopro-dashboard.py", line 102, in <module>
    gpx_timeseries = load_timeseries(args.gpx, units)
  File "/home/Projects/Navigation/gopro-overlay/bin/../gopro_overlay/gpx.py", line 51, in load_timeseries
    gpx = load(filepath, units)
  File "/home/Projects/Navigation/gopro-overlay/bin/../gopro_overlay/gpx.py", line 47, in load
    return [with_unit(p, units) for p in fudge(gpx)]
  File "/home/Projects/Navigation/gopro-overlay/bin/../gopro_overlay/gpx.py", line 47, in <listcomp>
    return [with_unit(p, units) for p in fudge(gpx)]
  File "/home/Projects/Navigation/gopro-overlay/bin/../gopro_overlay/gpx.py", line 24, in fudge
    for element in point.extensions[0].iter():
IndexError: list index out of range
@tve
Copy link
Author

tve commented Feb 17, 2022

Looks like the crash is due to the fact that my gpx file doesn't have any point extensions. Gopro-dashboard shouldn't crash because of that... (Now looking what happened to my HR data...)

If I specify -o gpx,gpxver=1.1,garminextensions=1 to gpsbabel I get GPX looking like:

      <trkpt lat="34.405176993" lon="-119.842140907">
        <ele>-4.000</ele>
        <time>2022-02-15T22:12:27Z</time>
        <extensions>
          <gpxtpx:TrackPointExtension>
            <gpxtpx:atemp>20.000000</gpxtpx:atemp>
            <gpxtpx:hr>153</gpxtpx:hr>
          </gpxtpx:TrackPointExtension>
        </extensions>
      </trkpt>

which also causes gopro-dashboard to crash...

Looks like this is a limitation of gpxpy: tkrajina/gpxpy#119 and tkrajina/gpxpy#242
How do you guys get the hr data into gpx?

@time4tea time4tea added the enhancement New feature or request label Feb 18, 2022
@time4tea
Copy link
Owner

Need to support gpx files from sources other than strava.

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

No branches or pull requests

2 participants