Closed danielegger1 closed 1 year ago
hey, I have found the same error. The day I implemented the daily water function, everything was working fine. The next day the server gave me only the value 0, even directly in the myjudo webfrontend in the chart. i will deactivate the function now for the time being and implement it differently if necessary. the server seems to somehow ban the chart-data requests after some http-get
Since updating to the latest version I receive after some minutes / hours an exception which is not handled. I am not sure what causes this, as I am using AppDaemon, the upper part from the exception is different to a standalone python installation.
I comment the two lines which raises that error, maybe you have a better idea about this issue.
2023-01-16 21:41:01.602020 WARNING Error: ------------------------------------------------------------ 2023-01-16 21:41:01.603909 WARNING Error: Unexpected error loading module: /config/appdaemon/apps/getjudo.py: 2023-01-16 21:41:01.605717 WARNING Error: ------------------------------------------------------------ 2023-01-16 21:41:01.613504 WARNING Error: Traceback (most recent call last): File "/usr/lib/python3.10/site-packages/appdaemon/app_management.py", line 993, in check_app_updates await utils.run_in_executor(self, self.read_app, mod["name"], mod["reload"]) File "/usr/lib/python3.10/site-packages/appdaemon/utils.py", line 337, in run_in_executor response = future.result() File "/usr/lib/python3.10/concurrent/futures/thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "/usr/lib/python3.10/site-packages/appdaemon/app_management.py", line 784, in read_app self.modules[module_name] = importlib.import_module(module_name) File "/usr/lib/python3.10/importlib/init.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in _call_with_frames_removed
File "/config/appdaemon/apps/getjudo.py", line 372, in
water_today.value = get_water_daily(0)
File "/config/appdaemon/apps/getjudo.py", line 233, in get_water_daily
daily_water = int(val[0:8],16) + int(val[8:16],16) + int(val[16:24],16) + int(val[24:32],16) + int(val[32:40],16) + int(val[40:48],16) + int(val[48:56],16) + int(val[56:64],16)
TypeError: 'NoneType' object is not subscriptable