appdaemon icon indicating copy to clipboard operation
appdaemon copied to clipboard

Startup failure due to module import error on yaml/scanner.py

Open aguscerdo opened this issue 8 months ago • 0 comments

What happened?

AppDaemon fails startup due to indentation error in imported module. /usr/lib/python3.12/site-packages/yaml/scanner.py", line 1243

-----------------------------------------------------------
 Add-on: AppDaemon
 Python Apps and Dashboard using AppDaemon 4.x for Home Assistant
-----------------------------------------------------------
 Add-on version: 0.17.7
 You are running the latest version of this add-on.
 System: Home Assistant OS 16.0  (amd64 / qemux86-64)
 Home Assistant Core: 2025.7.4
 Home Assistant Supervisor: 2025.07.2
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------

Version

0.17.7

Installation type

Home Assistant add-on

Relevant log output

Traceback (most recent call last):
  File "/usr/bin/appdaemon", line 5, in <module>
    from appdaemon.__main__ import main
  File "/usr/lib/python3.12/site-packages/appdaemon/__init__.py", line 1, in <module>
    from .adapi import ADAPI
  File "/usr/lib/python3.12/site-packages/appdaemon/adapi.py", line 17, in <module>
    from appdaemon import dependency, utils
  File "/usr/lib/python3.12/site-packages/appdaemon/utils.py", line 29, in <module>
    import yaml
  File "/usr/lib/python3.12/site-packages/yaml/__init__.py", line 8, in <module>
    from .loader import *
  File "/usr/lib/python3.12/site-packages/yaml/loader.py", line 5, in <module>
    from .scanner import *
  File "/usr/lib/python3.12/site-packages/yaml/scanner.py", line 1243
    !    if line_break != '\n':
                               ^

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


Anything else?

Full logs:

s6-rc: info: service base-addon-banner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service base-addon-log-level: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service base-addon-log-level successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-appdaemon: starting
s6-rc: info: service init-appdaemon successfully started
s6-rc: info: service appdaemon: starting
s6-rc: info: service appdaemon successfully started
s6-rc: info: service legacy-services: starting
[20:49:33] INFO: Starting AppDaemon...
s6-rc: info: service legacy-services successfully started
Traceback (most recent call last):
  File "/usr/bin/appdaemon", line 5, in <module>
    from appdaemon.__main__ import main
  File "/usr/lib/python3.12/site-packages/appdaemon/__init__.py", line 1, in <module>
    from .adapi import ADAPI
  File "/usr/lib/python3.12/site-packages/appdaemon/adapi.py", line 17, in <module>
    from appdaemon import dependency, utils
  File "/usr/lib/python3.12/site-packages/appdaemon/utils.py", line 29, in <module>
    import yaml
  File "/usr/lib/python3.12/site-packages/yaml/__init__.py", line 8, in <module>
    from .loader import *
  File "/usr/lib/python3.12/site-packages/yaml/loader.py", line 5, in <module>
    from .scanner import *
  File "/usr/lib/python3.12/site-packages/yaml/scanner.py", line 1243
    !    if line_break != '\n':
                               ^
IndentationError: unindent does not match any outer indentation level
[20:49:34] INFO: Service AppDaemon exited with code 1 (by signal 0)
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service appdaemon: stopping
s6-rc: info: service appdaemon successfully stopped
s6-rc: info: service init-appdaemon: stopping
s6-rc: info: service init-appdaemon successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service base-addon-log-level: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service base-addon-log-level successfully stopped
s6-rc: info: service base-addon-banner: stopping
s6-rc: info: service base-addon-banner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

aguscerdo avatar Aug 01 '25 05:08 aguscerdo