time4tea / gopro-dashboard-overlay

Programs to process GoPro MP4 & Generic GPX/FIT files and create video dashboards & maps

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

'float' object has no attribute 'lat'

patkoscsaba opened this issue · comments

I haven't use gopro-dashboard-overlay for about 2 months. It was working just fine back then.
However today, March 17, 2023, I am getting the following error.

Starting gopro-dashboard version 0.90.0
GPX/FIT file:     2023-03-17T11:57:10+00:00 -> 2023-03-17T12:48:40+00:00
Timer(loading timeseries - Called: 1, Total: 6.79421, Avg: 6.79421, Rate: 0.15)
Generating overlay at Dimension(x=1920, y=1080)
Timeseries has 30901 data points
Processing....
Timer(processing - Called: 1, Total: 0.19630, Avg: 0.19630, Rate: 5.09)
Timer(program - Called: 1, Total: 6.99061, Avg: 6.99061, Rate: 0.14)
Traceback (most recent call last):
  File "/home/csaba/Videos/Pedalare_In_Padurea_Verde/gopro-overlay/venv/bin/gopro-dashboard.py", line 234, in <module>
    frame_meta.process_deltas(timeseries_process.calculate_speeds(), skip=packets_per_second * 3, filter_fn=locked_2d)
  File "/mnt/m2/Videos/Pedalare_In_Padurea_Verde/gopro-overlay/venv/lib/python3.10/site-packages/gopro_overlay/framemeta.py", line 211, in process_deltas
    updates = processor(entry_a, entry_b, skip)
  File "/mnt/m2/Videos/Pedalare_In_Padurea_Verde/gopro-overlay/venv/lib/python3.10/site-packages/gopro_overlay/timeseries_process.py", line 54, in accept
    dist, raw_azi = distance_azi_between(a.point, b.point)
  File "/mnt/m2/Videos/Pedalare_In_Padurea_Verde/gopro-overlay/venv/lib/python3.10/site-packages/gopro_overlay/timeseries_process.py", line 46, in distance_azi_between
    inverse = Geodesic.WGS84.Inverse(a.lat, a.lon, b.lat, b.lon)
AttributeError: 'float' object has no attribute 'lat'

This error happens both on version 0.71 that I was using in the past, and on the latest 0.90. Just to be sure, I also completely reinstalled it.
The parameters I am using are as below:
gopro-dashboard.py --use-fit-only --fit <a_FIT_file_with_full_path> --profile overlay --overlay-size 1920x1080 --font "<full_path_to>/Roboto-Regular.ttf" --layout-xml "<full_path_to>/render-overlay-layout.xml" ./Resources/{}.mov

Python version is:

[csaba@csaba-pc gopro-overlay]$ venv/bin/python --version
Python 3.10.10

The layout is my custom one and it was not changed.

Let me know what other information can I provide. Thanks.

Thanks for reporting! I'll take a look.

Hi - I have looked into this, and I can't reproduce it. Would you be able to share the fit file and the mov? This might help track down the problem. If you can, please share with wetransfer or similar to gopro-overlay [at] time4tea.net .. if not, of course absolutely no problem.

You are right. It seems to be an issue with the FIT file. Also, it seems to be an issue only with one particular file. Both newer and older files seem to be working.
NOT working file: 2023-03-17-13-57-10.fit
WORKING file: 2023-04-20-12-10-27.fit
I an not sure what the issue could be. The activity in Garmin works just fine.
All activities are recorded with a Garmin Edge 1030 Plus cycling computer.
fit_file_issues.tar.gz

Thanks! Having an example makes things way easier to debug.