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

script finds 0 activities #219

Closed
pflajszer opened this issue Jan 14, 2024 · 1 comment
Closed

script finds 0 activities #219

pflajszer opened this issue Jan 14, 2024 · 1 comment

Comments

@pflajszer
Copy link

Describe the bug
The last activities import I have is around August 2023. I was using the iterative update script (garmindb_cli.py --all --download --import --analyze --latest) to get new data periodically, but I've noticed that all metrics were updating except activities. I've reinstalled version 3.5.2 but the issue still persists. Even after deleting HealthData folder, the script just proceeds downloading monitoring data as it finds 0 activities:

image

To Reproduce
Steps to reproduce the behavior:

  1. use v 3.5.2
  2. run garmindb_cli.py --all --download --import --analyze --latest on existing data or garmindb_cli.py --all --download --import --analyze on a fresh install
  3. the FitFiles/Activities folder will be empty (only containing activity_types.json; the DBs/garmin_activities.db will also be empty (or, if you already had this working and have some data in the db, the LastModified will indicate the .db file wasn't updated now and not have recent data)

Expected behavior
Activities db/fit files get populated with the latest data

Logs

INFO:root:Fetching 100000 activities to /home/atampaolo/HealthData/FitFiles/Activities
INFO:root:get_activity_types: '/home/atampaolo/HealthData/FitFiles/Activities'
INFO:/home/atampaolo/mambaforge/envs/garmin/lib/python3.12/site-packages/garmindb/download.py:Getting activities: '/home/atampaolo/HealthData/FitFiles/Activities' (100000) temp /tmp/tmpyrcpuxh5
INFO:root:get_activity_summaries
ERROR:root:Exception getting activity summary: Error in request: 400 Client Error: Bad Request for url: https://connectapi.garmin.com/activitylist-service/activities/search/activities?start=0&limit=100000
INFO:root:unzip_files: from /tmp/tmpyrcpuxh5 to /home/atampaolo/HealthData/FitFiles/Activities
INFO:/home/atampaolo/mambaforge/envs/garmin/bin/garmindb_cli.py:Downloading all monitoring data from: 2019-12-31 [1475]
@pflajszer
Copy link
Author

pflajszer commented Jan 14, 2024

Funny I've actually resolved it while writing this up, but I thought I'll post it anyways in case someone else encounters this.
The issue is the number of activities to download specified in the .GarminDb/GarminConnectConfig.json:

image

Updating the number under download_all_activities to a lower one (I went with 3000) did the trick for me

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

No branches or pull requests

1 participant