Closed helto4real closed 3 years ago
I'm afraid I can't reproduce that --
In [1]: import myfitnesspal
In [2]: client = myfitnesspal.Client('my_username', password='mypassword')
In [3]: client.get_date(2021,5,9)
Out[3]: <05/09/21 {'calories': 606.0, 'carbohydrates': 57.0, 'fat': 14.0, 'protein': 58.0}>
First -- make sure you're using the latest version of mfp --
In [5]: import myfitnesspal
In [6]: myfitnesspal.__version__
Out[6]: '1.16.4'
If you see a value other than 1.16.4, you just need to update the library to the latest version.
My only real guess beyond that would be that you're not actually entering the correct password -- note that the username/password you need to enter are not the username/password for whichever form of social auth (e.g. google/facebook) you might usually use for logging-in -- it has to be your actual myfitnesspal username and password.
You can double-check your username by going to https://www.myfitnesspal.com/account/settings and clicking on "Change username". It'll there show you your current username. There's of course no way to see your existing password, but you can also try changing your password from the "Change password" link on that same page.
Good luck; I hope this helps!
hmm weird, I get version 1.13.4 when I use import myfitnesspal
never mind it was cached
With the latest version it worked OK. Sorry and thanks for the help
Recent myfitnesspal pypi package returns an error when login. using
client = myfitnesspal.Client('username', password='correct_password')