Closed dchristle closed 8 years ago
Thanks for the heads-up @dchristle; a fix for this was released as part of v1.7.1 (4d4b917ee1f055ccad503243851cf37e1f89ca5a).
Just an FYI -- if you bump into something like this in the future; please make the change that fixes the problem in a branch and file a pull request. Although in this specific instance it was a one-line change and it wasn't difficult for me to follow (and, probably, for you to write), you're actually making things quite a lot harder on yourself than they have to when you do it this way :-). Cheers, and let me know if you need help with a pull request in the future!
Hi Adam,
Yep! Thanks for the response. I'm new to both Python 3 and actually "collaborating" on git -- I use it to have a repo of the code I use for work so my coworkers can view it, but I have no experience doing "pulls" and merging changes, so I wasn't totally clear on the "safe" way to implement the change. Anyway, thanks for doing it and hope it was helpful.
Also, thank you for making the myfitnesspal library! I love being able to just plug in the library and get the data I want without having to figure out the nitty gritty stuff with MFP.
Cheers, David
On Sun, Jan 24, 2016 at 6:45 PM, Adam Coddington notifications@github.com wrote:
Thanks for the heads-up @dchristle https://github.com/dchristle; a fix for this was released as part of v1.7.1 (4d4b917 https://github.com/coddingtonbear/python-myfitnesspal/commit/4d4b917ee1f055ccad503243851cf37e1f89ca5a ).
Just an FYI -- if you bump into something like this in the future; please make the change that fixes the problem in a branch and file a pull request. Although in this specific instance it was a one-line change and it wasn't difficult for me to follow (and, probably, for you to write), you're actually making things quite a lot harder on yourself than they have to when you do it this way :-). Cheers, and let me know if you need help with a pull request in the future!
— Reply to this email directly or view it on GitHub https://github.com/coddingtonbear/python-myfitnesspal/issues/26#issuecomment-174358631 .
It absolutely was helpful! There definitely is a learning curve to using git, but don't worry too much -- it's not as complicated as it sounds, and people are usually very, very forgiving if you just mention that you're pretty new to the process.
Thanks again for the bug report!
Cheers, Adam
On Wed, Feb 3, 2016 at 9:50 PM, David Christle notifications@github.com wrote:
Hi Adam,
Yep! Thanks for the response. I'm new to both Python 3 and actually "collaborating" on git -- I use it to have a repo of the code I use for work so my coworkers can view it, but I have no experience doing "pulls" and merging changes, so I wasn't totally clear on the "safe" way to implement the change. Anyway, thanks for doing it and hope it was helpful.
Also, thank you for making the myfitnesspal library! I love being able to just plug in the library and get the data I want without having to figure out the nitty gritty stuff with MFP.
Cheers, David
On Sun, Jan 24, 2016 at 6:45 PM, Adam Coddington <notifications@github.com
wrote:
Thanks for the heads-up @dchristle https://github.com/dchristle; a fix for this was released as part of v1.7.1 (4d4b917 < https://github.com/coddingtonbear/python-myfitnesspal/commit/4d4b917ee1f055ccad503243851cf37e1f89ca5a
).
Just an FYI -- if you bump into something like this in the future; please make the change that fixes the problem in a branch and file a pull request. Although in this specific instance it was a one-line change and it wasn't difficult for me to follow (and, probably, for you to write), you're actually making things quite a lot harder on yourself than they have to when you do it this way :-). Cheers, and let me know if you need help with a pull request in the future!
— Reply to this email directly or view it on GitHub < https://github.com/coddingtonbear/python-myfitnesspal/issues/26#issuecomment-174358631
.
— Reply to this email directly or view it on GitHub https://github.com/coddingtonbear/python-myfitnesspal/issues/26#issuecomment-179656213 .
@dchristle That was really helpful. Thank you :)
I've found what I believe is a new bug in the code, and I believe it's a new error message introduced in Python 3.5. The issue is that measurements.keys() does not return a copy, so it should not be modified while iterating.
The fix is simple - I changed line 294 from:
for date in measurements.keys():
to:
for date in list(measurements.keys()):
And that solves the problem -- list returns a copy, essentially.
Best, David
Traceback log:
RuntimeError Traceback (most recent call last)