thiswillbeyourgithub / SleepTk_pinetime_sleep_tracker

SleepTk: sleep tracker with smart alarm for the pinetime on wasp-os
GNU General Public License v3.0
57 stars 3 forks source link

Trace back error AttributeError: 'Manager' object has no attribute #5

Closed GaryM0101 closed 1 year ago

GaryM0101 commented 1 year ago

I have SleepTk installed on a Pinetime using your updated instructions. I'm trying again after giving up on previous past attempts.

I'm getting a traceback error "AttributeError: 'Manager' object has no attribute" when launching the icon.

At the terminal I run this:

pi@raspberrypi:~/wasp-os/wasp/apps $ python -tt SleepTk.py File "SleepTk.py", line 17 SyntaxError: Non-ASCII character '\xc3' in file SleepTk.py on line 18, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

Not sure if this is even related to the traceback but could be a code encoding declaration per python...IDK? I might take a stab at trying to workaround this so I'll let you know if I find anything on my end.

Gary

thiswillbeyourgithub commented 1 year ago

Hi!

On line 17 all I see is the "ö" when crediting the author of the icon. Given that's in a docstring I would be very surprised it it caused any issue but you can still try to remove it just in case.

I don't think it has to do with SleepTk or you'll have to find another more helpful error message.

Don't hesitate to re open this issue when you know more!

GaryM0101 commented 1 year ago

Found the issue using the simulator at least in my case.

File "/home/pi/wasp-os/apps/SleepTk.py", line 120, in _actual_init for p in wasp.system.get("sleeptk_settings")] AttributeError: 'Manager' object has no attribute 'get'

Doesn't like this statement for some reason: for p in wasp.system.get("sleeptk_settings")]

So I reverted back to one of your previous branches, 6b45b89f74 that doesn't have this "get" and now runs.

thiswillbeyourgithub commented 1 year ago

The get and set method of wasp are not yet approved in the main branch but are in my own branch of wasp os.

Here's my PR about it : https://github.com/wasp-os/wasp-os/pull/368

Here's my branch that I use on my watch: https://github.com/thiswillbeyourgithub/wasp-os

They are used to persistently save information on the watch. In thise case : previous settings like wether "gradual wake" is checked or not.

I strongly advise not to use an outdated version of SleepTk as I might have fixed bugs since then (don't have time to check currently).

Maybe the best would be for you to apply my waspos PR to your version to have the get/set