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

HTTP 404 error when activity does not exist #51

Open
rsjrny opened this issue Dec 25, 2020 · 1 comment
Open

HTTP 404 error when activity does not exist #51

rsjrny opened this issue Dec 25, 2020 · 1 comment

Comments

@rsjrny
Copy link

rsjrny commented Dec 25, 2020

The activity is in the list of activities but when you select the activity you get a 404 error (page not found error). I have two instances of this and will leave my Garmin activities as they are so I can reproduce the error when testing the resolution.

I would like to display a warning message and return to processing.

Garmin Connect activity (1332/1500) [2646199078] 4 x 2:30 intervals
2018-04-23T10:26:38+20:00, 00:51:12, 6.453km
FIT data file already exists; skipping...
Garmin Connect activity (1333/1500) [2646171725] Zwift Run - Richmond
[ERROR] Failed to reach url https://connect.garmin.com/modern/proxy/activity-service/activity/2646171725, error: HTTP Error 404: Not Found
Traceback (most recent call last):
File "C:/Users/russl/Dropbox/PYCharmProjects/garmin-connect-export-1/gcexport.py", line 1105, in
main(sys.argv)
File "C:/Users/russl/Dropbox/PYCharmProjects/garmin-connect-export-1/gcexport.py", line 1013, in main
activity_details = http_req_as_string(URL_GC_ACTIVITY + str(actvty['activityId']))
File "C:/Users/russl/Dropbox/PYCharmProjects/garmin-connect-export-1/gcexport.py", line 273, in http_req_as_string
return http_req(url, post, headers).decode()
File "C:/Users/russl/Dropbox/PYCharmProjects/garmin-connect-export-1/gcexport.py", line 249, in http_req
response = OPENER.open(request, data=post)
File "C:\Program Files (x86)\Python37\lib\urllib\request.py", line 531, in open
response = meth(req, response)
File "C:\Program Files (x86)\Python37\lib\urllib\request.py", line 641, in http_response
'http', request, response, code, msg, hdrs)
File "C:\Program Files (x86)\Python37\lib\urllib\request.py", line 569, in error
return self._call_chain(*args)
File "C:\Program Files (x86)\Python37\lib\urllib\request.py", line 503, in _call_chain
result = func(*args)
File "C:\Program Files (x86)\Python37\lib\urllib\request.py", line 649, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found

Process finished with exit code 1

@rsjrny
Copy link
Author

rsjrny commented Dec 26, 2020

I have the missing activity condition fixed in rsjrny / garmin-connect-export-1. This fork also contains a new argument to add newly downloaded activities to a zipped archive file

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