coddingtonbear / python-myfitnesspal

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

get_date not working #23

Closed adamjermyn closed 8 years ago

adamjermyn commented 8 years ago

Currently get_date errors out with the following message:

Traceback (most recent call last): File "test.py", line 15, in day = client.get_date(today) File "/usr/local/lib/python2.7/site-packages/myfitnesspal/client.py", line 222, in get_date goals = self._get_goals(document) File "/usr/local/lib/python2.7/site-packages/myfitnesspal/client.py", line 122, in _get_goals total_header = document.xpath("//tr[@class='total']")[0] IndexError: list index out of range

This happens regardless of the date requested.

mikeres0 commented 8 years ago

For the username are you typing in your email address? Try typing in your actual username, this cured the error for me.

adamjermyn commented 8 years ago

Ah that works, thanks!

-Adam

On Thu, Nov 12, 2015 at 9:52 PM, Mike Resoli notifications@github.com wrote:

For the username are you typing in your email address? Try typing in your actual username, this cured the error for me.

— Reply to this email directly or view it on GitHub https://github.com/coddingtonbear/python-myfitnesspal/issues/23#issuecomment-156247546 .

mikeres0 commented 8 years ago

You're welcome! On 17 Nov 2015 14:05, "adamjermyn" notifications@github.com wrote:

Ah that works, thanks!

-Adam

On Thu, Nov 12, 2015 at 9:52 PM, Mike Resoli notifications@github.com wrote:

For the username are you typing in your email address? Try typing in your actual username, this cured the error for me.

— Reply to this email directly or view it on GitHub < https://github.com/coddingtonbear/python-myfitnesspal/issues/23#issuecomment-156247546

.

— Reply to this email directly or view it on GitHub https://github.com/coddingtonbear/python-myfitnesspal/issues/23#issuecomment-157378359 .