coddingtonbear / python-myfitnesspal

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

Accuracy of totals property #96

Closed sarahnator closed 4 years ago

sarahnator commented 4 years ago

First off, thank you for creating this API! After tweaking the KEYRING_SYSTEM path, I got it to work and it's great. I noticed, however, that the values in the totals property can be off by around 1-2 grams. I'm wondering what's causing this issue? Thanks!

coddingtonbear commented 4 years ago

I can’t say which totals you might be referring to — there are lots— but i’d be surprised if the answer weren’t just “rounding”.

It’s hard to say what kinds of dark magic are going on in mfp itself, but i’m aware that many displayed figures in the ui (which are the main source of data for this library) are actually rounded from the actual value they represent.

mtthwsar commented 4 years ago

@sarahnator, MFP seem to round portion sizes differently between their mobile app and their web app.

This package will always match exactly what's showing in the web app, but sometimes you'll find that the macros in the mobile app are off by 1-2 grams.

sarahnator commented 4 years ago

Thank you both for clearing up the confusion!