Can't import GPX
DavidHenryThoreau opened this issue · 9 comments
I've tried to import that GPX file :
https://www.visugpx.com/download.php?id=LW80xEsvce
Unable to create activity stream (-5/-6/-7/-8/-9/-10/-11).
Thanks for reaching out. Do you have any error in the backend logs?
Both the app.log file and the container log?
I've enable logs before uploading GPX file the only things i'm getting is bellow :
docker logs backend -f
INFO: 172.27.0.4:35936 - "GET /validate_token HTTP/1.1" 200 OK
INFO: 172.27.0.4:35946 - "GET /activities/useractivities/pagenumber/1/numRecords/5 HTTP/1.1" 200 OK
INFO: 172.27.0.4:35958 - "GET /activities/useractivities/number HTTP/1.1" 200 OK
INFO: 172.27.0.4:35966 - "GET /activities/followeduseractivities/pagenumber/1/numRecords/5 HTTP/1.1" 200 OK
INFO: 172.27.0.4:35976 - "GET /activities/followeduseractivities/number HTTP/1.1" 200 OK
INFO: 172.27.0.4:35978 - "GET /activities/useractivities/1/thisweek/distances HTTP/1.1" 200 OK
INFO: 172.27.0.4:35984 - "GET /activities/useractivities/1/thismonth/distances HTTP/1.1" 200 OK
root@debian-12:~/endurain# docker exec -it backend cat app.log
2024-01-31 13:59:47,416 - myLogger - INFO - 0 access tokens deleted from the database
2024-01-31 14:04:47,416 - myLogger - INFO - 0 access tokens deleted from the database
Can you try with a different GPX?
Some files don't upload and I can't figure it out why.
Can you reproduce my error by importing these GPX ?
Hello again,
Yes I was able to reproduce the error:
"in calculate_instant_speed
time_calc = datetime.fromisoformat(time.strftime("%Y-%m-%dT%H:%M:%S"))
^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'strftime'"
I opened the .gpx files provided and those files appear to be route files and not "normal" activities files generated after you do an activity, which means they lack certain types of fields like time, HR, others.
The activity processor flow used uses the field time to do some calculations, and that's why it is not working.
Example:
- Provided file track point:
<trkpt lat="46.18405" lon="6.14211">
- One of my .gpx files exported from Strava track point:
<trkpt lat="Removed on purpose" lon="Removed on purpose">
<ele>14.8</ele>
<time>2024-01-29T16:04:17Z</time>
<extensions>
<power>0</power>
<gpxtpx:TrackPointExtension>
<gpxtpx:hr>79</gpxtpx:hr>
<gpxtpx:cad>0</gpxtpx:cad>
</gpxtpx:TrackPointExtension>
</extensions>
</trkpt>
Can you upload a .gpx file exported from Strava, Garmin Connect, other equivalent and check if it works?
I'm not using Strava or Garmin Connect
Maybe route support can be implemented in the future