I have a python app that has worked for a number of years. However, with the recent AppDaemon update, the app no longer loads. I’m at a loss as to what I need to change to fix the issue.
The logs indicate that the library can’t be loaded. Can anyone suggest what steps I can take to isolate the issue?
2023-08-08 20:46:40.661068 INFO HASS: Connected to Home Assistant 2023.8.1
2023-08-08 20:46:40.711198 INFO HASS: Evaluating startup conditions
2023-08-08 20:46:40.717833 INFO HASS: Startup condition met: hass state=RUNNING
2023-08-08 20:46:40.717964 INFO HASS: All startup conditions met
2023-08-08 20:46:40.739835 INFO AppDaemon: Processing restart for HASS
2023-08-08 20:46:40.739985 INFO AppDaemon: Terminating stereo_app_automation
2023-08-08 20:46:40.740298 INFO AppDaemon: Reloading Module: /config/appdaemon/apps/stereo_app.py
2023-08-08 20:46:40.740420 INFO AppDaemon: Loading App Module: stereo_app
2023-08-08 20:46:40.743273 WARNING Error: ------------------------------------------------------------
2023-08-08 20:46:40.743470 WARNING Error: Unexpected error loading module: /config/appdaemon/apps/stereo_app.py:
2023-08-08 20:46:40.743558 WARNING Error: ------------------------------------------------------------
2023-08-08 20:46:40.744353 WARNING Error: Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/appdaemon/app_management.py", line 763, in read_app
importlib.reload(self.modules[module_name])
~~~~~~~~~~~~^^^^^^^^^^^^^
KeyError: 'stereo_app'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/appdaemon/app_management.py", line 1000, in check_app_updates
await utils.run_in_executor(self, self.read_app, mod["name"], mod["reload"])
File "/usr/lib/python3.11/site-packages/appdaemon/utils.py", line 304, in run_in_executor
response = future.result()
^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/appdaemon/app_management.py", line 768, in read_app
self.read_app(file)
File "/usr/lib/python3.11/site-packages/appdaemon/app_management.py", line 783, in read_app
self.modules[module_name] = importlib.import_module(module_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load