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

Can't import GPX #7

Open
DavidHenryThoreau opened this issue Jan 31, 2024 · 9 comments
Open

Can't import GPX #7

DavidHenryThoreau opened this issue Jan 31, 2024 · 9 comments
Assignees
Labels
enhancement New feature or request

Comments

@DavidHenryThoreau
Copy link

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).

@joaovitoriasilva joaovitoriasilva self-assigned this Jan 31, 2024
@joaovitoriasilva joaovitoriasilva added the bug Something isn't working label Jan 31, 2024
@joaovitoriasilva
Copy link
Owner

Thanks for reaching out. Do you have any error in the backend logs?
Both the app.log file and the container log?

@DavidHenryThoreau
Copy link
Author

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

@DavidHenryThoreau
Copy link
Author

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

@joaovitoriasilva
Copy link
Owner

Can you try with a different GPX?
Some files don't upload and I can't figure it out why.

@DavidHenryThoreau
Copy link
Author

Can you reproduce my error by importing these GPX ?

@joaovitoriasilva
Copy link
Owner

joaovitoriasilva commented Feb 6, 2024

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?

@DavidHenryThoreau
Copy link
Author

I'm not using Strava or Garmin Connect

@joaovitoriasilva joaovitoriasilva added enhancement New feature or request and removed bug Something isn't working labels Feb 10, 2024
@joaovitoriasilva
Copy link
Owner

Maybe route support can be implemented in the future

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