tomasy / date-time-adapter

Date Time Adapter for Mozill IoT
Mozilla Public License 2.0
0 stars 4 forks source link

type error in util.py plus error in config.py #30

Open GFG-CHAOS opened 2 years ago

GFG-CHAOS commented 2 years ago

Hi,

after restarting my gateway recently the date time adapter doesn't work anymore and the logs say the following:

2022-11-13 22:35:34.268 INFO : Plugin: date-time-adapter died, code = 0 restarting after 3000 2022-11-13 22:35:37.853 INFO : date-time-adapter: config.py:35 ERROR Strange config:searchReplaceComas() takes 2 positional arguments but 3 were given 2022-11-13 22:35:37.855 INFO : date-time-adapter: Traceback (most recent call last): 2022-11-13 22:35:37.857 INFO : date-time-adapter: File "/home/pi/.webthings/addons/date-time-adapter/pkg/config.py", line 27, in load 2022-11-13 22:35:37.858 INFO : date-time-adapter: self.searchReplaceComas(self, config) # Replace comma w dot 2022-11-13 22:35:37.860 INFO : date-time-adapter: TypeError: searchReplaceComas() takes 2 positional arguments but 3 were given 2022-11-13 22:35:37.862 INFO : date-time-adapter: EXECPTION 2022-11-13 22:35:37.863 INFO : date-time-adapter: can only update value with string or number 2022-11-13 22:35:37.865 INFO : date-time-adapter: ('can only update value with string or number',) 2022-11-13 22:35:37.906 INFO : date-time-adapter: ['Traceback (most recent call last):\n', ' File "/home/pi/.webthings/addons/date-time-adapter/main.py", line 41, in <module>\n _ADAPTER = DateTimeAdapter(verbose=_DEBUG)\n', ' File "/home/pi/.webthings/addons/date-time-adapter/pkg/date_adapter.py", line 24, in __init__\n self.start_pairing(1)\n', ' File "/home/pi/.webthings/addons/date-time-adapter/pkg/date_adapter.py", line 42, in start_pairing\n self._config))\n', ' File "/home/pi/.webthings/addons/date-time-adapter/pkg/date_device.py", line 76, in __init__\n _config.horizon)\n', ' File "/home/pi/.webthings/addons/date-time-adapter/pkg/util.py", line 22, in __init__\n self.next_sunrise = self.calc_sunrise()\n', ' File "/home/pi/.webthings/addons/date-time-adapter/pkg/util.py", line 125, in calc_sunrise\n observer_today = self.get_observer()\n', ' File "/home/pi/.webthings/addons/date-time-adapter/pkg/util.py", line 106, in get_observer\n observer_today.horizon = self.horizon\n', 'TypeError: can only update value with string or number\n'] 2022-11-13 22:35:37.981 INFO : Plugin: date-time-adapter died, code = 0 restarting after 4000

any help would be appreciated

cheers Tobias

SnickerChar commented 2 years ago

Getting the same! I am on version 1.2.1, and the update fails to apply to 1.2.3. Remove also fails, but I can't find anything in the logs about it. The DELETE just hangs forever.