AppDaemon / appdaemon

:page_facing_up: Python Apps for Home Automation
Other
840 stars 417 forks source link

appdaemon:dev container stop to work after today update #2002

Closed myakove closed 5 months ago

myakove commented 5 months ago

What happened?

All apps failed to load.

Version

acockburn/appdaemon:latest

Installation type

Docker

Relevant log output

2024-05-01 22:14:30.806171 WARNING Error: ------------------------------------------------------------
2024-05-01 22:14:30.807737 INFO Error: Previous message repeated 1 times
2024-05-01 22:14:30.807835 WARNING Error: Unexpected error loading module: /conf/apps/wall_switch.py:
2024-05-01 22:14:30.807942 WARNING Error: ------------------------------------------------------------
2024-05-01 22:14:30.808441 WARNING Error: Traceback (most recent call last):
  File "/usr/local/lib/python3.11/site-packages/appdaemon/app_management.py", line 1250, in _load_reload_modules
    await utils.run_in_executor(self, self.read_app, mod)
  File "/usr/local/lib/python3.11/site-packages/appdaemon/utils.py", line 308, in run_in_executor
    response = future.result()
               ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/site-packages/appdaemon/app_management.py", line 865, in read_app
    self.modules[module_name] = importlib.import_module(module_name)
                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/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
  File "<frozen importlib._bootstrap>", line 1126, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1140, in _find_and_load_unlocked
ModuleNotFoundError: No module named '/conf/apps/wall_switch'

Relevant code in the app or config file that caused the issue

No response

Anything else?

Switch to tag latest as a workaround.

jsl12 commented 5 months ago

This was almost certainly caused by my recent PR. I'll look into it further in a couple hours.

Any information you have about the file structure of your apps folder would be really helpful.

myakove commented 5 months ago

My apps folder is flat.

❯ tree
.
├── 3d_printer.py
├── actions.py
├── alarm.py
├── android_phone_control.py
├── android_tv.py
├── appdaemon_error_notify.py
├── apps.yaml
├── balcony.py
├── battery_status.py
├── boiler.py
├── climate.py
├── const.py
├── cube.py
├── default_dashboard_theme.py
├── dryer_machine.py
├── dummy.py
├── entrance.py
├── face_recognition.py
├── fingerprint_reader.py
├── fully_kiosk_tablet.py
├── helpers.py
├── home_presence.py
├── infra.py
├── __init__.py
├── kettle.py
├── kitchen.py
├── knob.py
├── lights.py
├── mobile_app_events_callbacks.py
├── motion_sensors.py
├── nfc_tags.py
├── nuki_lock.py
├── palgate.py
├── phone_state.py
├── playstation.py
├── presence_detection.py
├── rhasspy.py
├── say_announce.py
├── servers.py
├── shutter_control.py
├── smart_plugs_power_state.py
├── tasmota_ir_lib.py
├── telegram_client.py
├── total_power_consumption.py
├── tower_fan.py
├── tv.py
├── ui_selectors.py
├── vacation.py
├── vacuum.py
├── wake_up_alarm.py
├── wall_switch.py
├── washer_machine.py
├── webhooks.py
└── wled.py
myakove commented 5 months ago

works, thanks.