question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Only the latest activity is imported from Garmin Connect to Dropbox on the same day

See original GitHub issue

Only the latest activity is imported from Garmin Connect to Dropbox when having multiple same category activities on the same day.

Example: I had two cycling activities on July 4th, one in the morning and the other in the evening. Only the evening’s activity was imported to Dropbox (2017-07-04_Pikkala Cycling_Cycling.tcx)

The issue appeared few weeks ago and probably is caused by this commit

dbcl.files_upload(data.encode("UTF-8"), fpath, mode=dropbox.files.WriteMode.overwrite)

dropbox.files.WriteMode.overwrite mode is used for uploading activity files and that seems to be the root cause.

Better and backwards compatible solution for uploading files would be to use dropbox.files.WriteMode.add mode with autorename=True option. files_upload function code

With those options, it would generate files like it used to do before the API upgrade commit:

  • 2017-06-19_Pikkala Cycling_Cycling.tcx
  • 2017-06-19_Pikkala Cycling_Cycling (1).tcx
  • 2017-06-19_Pikkala Cycling_Cycling (2).tcx

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:7
  • Comments:8 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
christofferholmstedtcommented, May 14, 2018

In the linked issue #369 I wrote a short workaround: Press “reconfigure” in dropbox tab then “setup” and change file format to something like this (include hours and minutes):

/<YYYY>/<YYYY><MM><DD>T<HH><MIN>_<NAME>_<TYPE>

I will see if I can create a pull request later this week to update the default filename settings to this instead.

@c5ef2 Do you think this change would be good enough?

0reactions
c5ef2commented, May 16, 2018

@christofferholmstedt The fix looks good. Both of my today’s cycling workouts were synced correctly after I had changed my Dropbox configuration as you suggested.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How Do I Manually Upload an Activity I Recorded to Garmin ...
Select This PC (Windows 10 only). · Locate and open the Garmin device drive. · If listed open the Primary drive. · Open...
Read more >
Only the latest activity is imported from Garmin Connect to Dropbox ...
Only the latest activity is imported from Garmin Connect to Dropbox when having multiple same category activities on the same day. Example:
Read more >
3 Ways to Automatically Copy Your Garmin Training Data to ...
Because I have a couple of activities in Garmin Connect (uhh…thousands), ... The next day I went out for a run, and let...
Read more >
Using Garmin Connect with RunGap
Activities as well as your connections' activities, which have already been imported, will be preserved – but new activities will no longer be...
Read more >
Changelog – RUNALYZE
Only activities uploaded to Polar in the last 30 days and only activities that ... With the Dropbox connection you can on the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found