coddingtonbear / python-myfitnesspal

Access your meal tracking data stored in MyFitnessPal programatically
MIT License
794 stars 136 forks source link

Unable to log in #75

Closed mcmenon closed 5 years ago

mcmenon commented 5 years ago

Running python 2.7 on mac osx. When I try to run

myfitnesspal.Client('username', 'password')

I get

Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/myfitnesspal-1.12.0-py2.7.egg/myfitnesspal/client.py", line 52, in __init__ self._login() File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/myfitnesspal-1.12.0-py2.7.egg/myfitnesspal/client.py", line 80, in _login document = self._get_document_for_url(login_url) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/myfitnesspal-1.12.0-py2.7.egg/myfitnesspal/client.py", line 206, in _get_document_for_url content = self._get_content_for_url(url) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/myfitnesspal-1.12.0-py2.7.egg/myfitnesspal/client.py", line 202, in _get_content_for_url self._get_request_for_url(*args, **kwargs).content.decode('utf8') File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/myfitnesspal-1.12.0-py2.7.egg/myfitnesspal/client.py", line 197, in _get_request_for_url **kwargs File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/sessions.py", line 525, in get return self.request('GET', url, **kwargs) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/sessions.py", line 512, in request resp = self.send(prep, **send_kwargs) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/sessions.py", line 622, in send r = adapter.send(request, **kwargs) File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests/adapters.py", line 495, in send raise ConnectionError(err, request=request) requests.exceptions.ConnectionError: ('Connection aborted.', error(54, 'Connection reset by peer'))

I'm confident my username and password are correct. Any help is appreciated.

coddingtonbear commented 5 years ago

"Connection reset by peer" means that a network error occurred when attempting to log-in. It's not likely to be a password problem. Unfortunately, errors of that class aren't the sort that'll be the fault of a library, and instead indicate some kind of problem on your network at home.

Sorry for not being able to help!

Cheers!