Updates of the python script - Automatically open the badge and/or challenge page

I got a bug report for the python script that it started to log errors so I made a quick fix of that to version 1.3.3, but realized that I have been working with a new version that takes command line arguments that has been asked for by some users. So, I finalized that new version and uploaded it to you. That is version 1.4.0.

The command line arguments are the following and you will get that information if you add the argument --help after the script.

Usage: garminbadges-updater.py [options]
Options and arguments:
   --clear           : Enter user credentials again.
   --help            : This information about options and arguments.
   --open-badges     : Open badge page after update.
   --open-challenges : Open challenge page after update.
   --version         : Print version of the script.
   --V               : Verbose/debug mode.

The useful arguments are --open-badges and --open-challenges that will open the badge and/or challenge page for the user.

The verbose/debug argument --V was supposed to do something, but will not do much right now. It might become useful in future versions, but currently it will just log some info before and after the script code.



Garmin Badge Database
Garmin Connect
Change country setting


Comments

  1. i'm using the chrome extension but it's not connecting. is this just me or is there an issue with the extension too?

    ReplyDelete
    Replies
    1. I tested the extension now and it works. Make sure you are looking at the Garmin Connect Web page and refreshed the page. After that click the update button.
      If it still doesn't work, then look in the console for errors.

      Delete
    2. ok thanks. it might be my internet connection.

      Delete
    3. BTW idea for next chrome extension version: if the user isn't on the desired page then open it in a new tab

      Delete
    4. @Gavriel. That is a good idea. I will see what I can do.

      Delete
  2. Bug report: This is not new, and I'm not even sure if it should be considered as a bug (strictly speaking probably it is) or a feature (shows more on-going challenges and that make you do more activities): I see that in the "Rise and Grind" I have done 1 and 6 to go. The bug IMHO is that this is not true, because of the "for 7 consecutive days" condition. So it's true I have done 1, but it was long ago, and since there was at least one day when I haven't do an activity it should've been reseted. Probably true for all the other "consecutive" badges as well.

    ReplyDelete
    Replies
    1. That is a problem on the Garmin side. I just fetch and display the value from Garmin and the values don't reset to 0 when you fail the streak. It often keeps the last value in the streak and the next streak you start will set the correct value.

      Delete
  3. I changed my country and then I noticed I had to log in again to both GB and GC. I wonder if this is necessary, as obviously neither of my credentials changed.

    ReplyDelete
    Replies
    1. That is because you switch country. Especially when switch between markets like Asia and Europe. I often have to login twice after a market switch.

      Delete
    2. I'm used to that in Garmin Connect, but why the script needs it if it already stores my credentials and they are the same no matter in which country I "reside" in

      Delete
    3. Hmmm... I have to test it myself and see. It could be that it tries to login, but Garmin has invalidated the session. I don't store your Garmin credentials so I can't just send them again.

      Delete
    4. It is something with changing the country setting. It will sometimes invalidate all sessions. I don't think I will try to handle that. I don't want to store Garmin account credentials so you have to write them again.
      One solution could be to use startup parameters and send them to the script and if they are needed could be used to login. It will not handle the MFA code if that is enabled.

      Delete
  4. I just noticed something on the My Challenges page: I finished the Active May badge on 13th May, but still the Predicted Finish Date shows 2024-05-22. Maybe it's a bug?

    ReplyDelete
    Replies
    1. No bug. I made it simple for myself and put the end date to today's date so it moves one day each day. I think I couldn't see the real end date for completed challenges when I implemented that function. I will take a look at it again.

      Delete
  5. Something strange is happening. I have version 1.4.0 running from cron on my server ever since the version came out. It did happen sometimes in the past that I had to re-login (usually when I changed country) but I never had any problem with it after I logged in.

    However today I noticed that my challenges page haven't been updated for more than a day. So I logged in to my server and manually ran garminbadges-updater.py. I had to log in, but refreshing the challenges page after it didn't fix the issue, in fact it made it way worse. The page was empty, and everything (user name, last updated date) were just "unknown". Re-running the updater again asked for my password, and the same happened again and again. Anyone else who is using the python updater noticed anything strange today?

    Strangely enough the Chrome exptension works.

    ReplyDelete
    Replies
    1. I haven't tested the python script in a while but ran a test now. I get the same behaviour. I will do some more testing in the coming days.

      Delete
    2. The issue is in Garth. There is a fix for it. I wrote a post about it here: https://blog.garminbadges.com/2024/11/issue-with-python-upload-script.html

      Delete

Post a Comment

Popular posts from this blog

Dance Fitness has arrived

June 2024 - Challenges and Badges

August 2024 - Challenges and Badges