-
Notifications
You must be signed in to change notification settings - Fork 34
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
mechanize crash #14
Comments
Also, suggestion -- .txt file extension is confusing, maybe better to choose .tcx or .gpx |
This is for the download.py script -- sorry, seeing only now that you have a lot of other stuff in this repository, too. |
Is it a specific workout that it crashes on (e.g. The 500 error referenced is reminiscent of what was plaguing even the manual TCX download on Garmin Connect for months. Agree on the download extension, too; feel free to submit a PR for that! |
I've tried running it several more times, and it always times out before downloading all of the workouts in my account, usually after a handful of workouts. Since it doesn't re-download files, I've collected most of what I need, step by step. I'm not sure if the mechanize library is just overly sensitive to something; or garmin's servers are flaky as hell. The first time (reported above, when I was able to grab 120 files in one go) was on a very good internet connection - maybe that's also a factor. I have only the one garmin account, and not much insight into these processes, so I probably don't have much more to contribute. Merry Christmas -- |
Thank you for the descriptive feedback; that's very helpful. I'm currently traveling so I don't have the best bandwidth right now for testing, but I've committed a refactoring in a separate branch that no longer relies on mechanize. If you're able, feel free to check out that branch ( Merry Christmas to you as well, and Happy New Year! |
~/Downloads/garmin-requests% sudo pip install mechanicalsoup |
Any ideas? |
Ooh. What version of Python are you using? I think that error goes away in Python 3. |
Some alternative for Python 3? Mechanize only works on 2.x |
tried script with mixed result -- downloaded about 120 workouts, then crashed with
2015-01-31_700755201.txt is downloading...
Traceback (most recent call last):
File "download.py", line 207, in
download_files_for_user(username, password, output)
File "download.py", line 162, in download_files_for_user
activities(agent, download_folder)
File "download.py", line 131, in activities
datafile = agent.open(url).get_data()
File "/Library/Python/2.7/site-packages/mechanize/_mechanize.py", line 203, in open
return self._mech_open(url, data, timeout=timeout)
File "/Library/Python/2.7/site-packages/mechanize/_mechanize.py", line 255, in _mech_open
raise response
mechanize._response.httperror_seek_wrapper: HTTP Error 500: Internal Server Error
The text was updated successfully, but these errors were encountered: