Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error #2

Open
94burns opened this issue Dec 8, 2024 · 4 comments
Open

Error #2

94burns opened this issue Dec 8, 2024 · 4 comments

Comments

@94burns
Copy link

94burns commented Dec 8, 2024

Screenshot 2024-12-08 214318
Screenshot 2024-12-08 214245

Thank you for this, Managed to get my exercises in. However for activity and weight I get these messages, any ideas? thanks

@PhilippImhof
Copy link
Owner

Hello and thanks for reaching out.

The first error means that the date/time is not stored as a timestamp (which it should be according to the docs), but in ISO format. The second error means that the height has not been set; in that case it makes sense to assume 0.

Could you please download the scripts from the following branch and tell me, whether they solve your problems?

https://github.com/PhilippImhof/FromSamToGarm/tree/issue-2

@PhilippImhof
Copy link
Owner

@94burns Have you tried the fix?

@AstraJens
Copy link

this is the output from my rpi5

root@raspberrypi5:/home/pi/AAA# python activity.py
Traceback (most recent call last):
File "/home/pi/AAA/activity.py", line 184, in
data = merge_data(fetch_floor_data(), fetch_calorie_data(), fetch_activity_data())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/pi/AAA/activity.py", line 117, in merge_data
merged_data[date]["Calories"] = 0
~~~~~~~~~~~^^^^^^
KeyError: '2017-04-04'
root@raspberrypi5:/home/pi/AAA#

@PhilippImhof
Copy link
Owner

Thanks @AstraJens

These errors (although silly) are sometimes difficult for me to catch, because I only have the data from my own export and it worked fine. I have pushed a correction to the branch linked above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants