Closed anothermort closed 11 months ago
Have this error message also when updating but only with display ESPs.
Same for me. Esphome 2032.8.1
INFO Reading configuration /config/esphome/esphome-web-34f45c.yaml...
ERROR Unexpected exception while reading configuration:
Traceback (most recent call last):
File "/usr/local/bin/esphome", line 33, in <module>
sys.exit(load_entry_point('esphome', 'console_scripts', 'esphome')())
File "/esphome/esphome/__main__.py", line 1023, in main
return run_esphome(sys.argv)
File "/esphome/esphome/__main__.py", line 1001, in run_esphome
config = read_config(dict(args.substitution) if args.substitution else {})
File "/esphome/esphome/config.py", line 986, in read_config
res = load_config(command_line_substitutions)
File "/esphome/esphome/config.py", line 840, in load_config
return _load_config(command_line_substitutions)
File "/esphome/esphome/config.py", line 828, in _load_config
result = validate_config(config, command_line_substitutions)
File "/esphome/esphome/config.py", line 756, in validate_config
result.run_validation_steps()
File "/esphome/esphome/config.py", line 125, in run_validation_steps
task.step.run(self)
File "/esphome/esphome/config.py", line 507, in run
validated = schema(self.conf)
File "/esphome/esphome/voluptuous_schema.py", line 34, in __call__
res = super().__call__(data)
File "/usr/local/lib/python3.9/dist-packages/voluptuous/schema_builder.py", line 272, in __call__
return self._compiled([], data)
File "/usr/local/lib/python3.9/dist-packages/voluptuous/validators.py", line 229, in _run
return self._exec(self._compiled, value, path)
File "/usr/local/lib/python3.9/dist-packages/voluptuous/validators.py", line 353, in _exec
v = func(path, v)
File "/usr/local/lib/python3.9/dist-packages/voluptuous/schema_builder.py", line 818, in validate_callable
return schema(data)
File "/esphome/esphome/voluptuous_schema.py", line 34, in __call__
res = super().__call__(data)
File "/usr/local/lib/python3.9/dist-packages/voluptuous/schema_builder.py", line 272, in __call__
return self._compiled([], data)
File "/usr/local/lib/python3.9/dist-packages/voluptuous/validators.py", line 229, in _run
return self._exec(self._compiled, value, path)
File "/usr/local/lib/python3.9/dist-packages/voluptuous/validators.py", line 353, in _exec
v = func(path, v)
File "/usr/local/lib/python3.9/dist-packages/voluptuous/schema_builder.py", line 595, in validate_dict
return base_validate(path, iteritems(data), out)
File "/esphome/esphome/voluptuous_schema.py", line 148, in validate_mapping
cval = cvalue(key_path, value)
File "/usr/local/lib/python3.9/dist-packages/voluptuous/schema_builder.py", line 818, in validate_callable
return schema(data)
File "/esphome/esphome/voluptuous_schema.py", line 34, in __call__
res = super().__call__(data)
File "/usr/local/lib/python3.9/dist-packages/voluptuous/schema_builder.py", line 272, in __call__
return self._compiled([], data)
File "/usr/local/lib/python3.9/dist-packages/voluptuous/schema_builder.py", line 818, in validate_callable
return schema(data)
File "/esphome/esphome/components/image/__init__.py", line 174, in _file_schema
return validate_file_shorthand(value)
File "/esphome/esphome/components/image/__init__.py", line 130, in validate_file_shorthand
validate_cairosvg_installed(value)
File "/esphome/esphome/components/image/__init__.py", line 80, in validate_cairosvg_installed
import cairosvg
File "/usr/local/lib/python3.9/dist-packages/cairosvg/__init__.py", line 26, in <module>
from . import surface # noqa isort:skip
File "/usr/local/lib/python3.9/dist-packages/cairosvg/surface.py", line 9, in <module>
import cairocffi as cairo
File "/usr/local/lib/python3.9/dist-packages/cairocffi/__init__.py", line 47, in <module>
cairo = dlopen(
File "/usr/local/lib/python3.9/dist-packages/cairocffi/__init__.py", line 44, in dlopen
raise OSError(error_message) # pragma: no cover
OSError: no library called "cairo-2" was found
no library called "cairo" was found
no library called "libcairo-2" was found
cannot load library 'libcairo.so.2': libcairo.so.2: cannot open shared object file: No such file or directory. Additionally, ctypes.util.find_library() did not manage to locate a library called 'libcairo.so.2'
cannot load library 'libcairo.2.dylib': libcairo.2.dylib: cannot open shared object file: No such file or directory. Additionally, ctypes.util.find_library() did not manage to locate a library called 'libcairo.2.dylib'
cannot load library 'libcairo-2.dll': libcairo-2.dll: cannot open shared object file: No such file or directory. Additionally, ctypes.util.find_library() did not manage to locate a library called 'libcairo-2.dll'```
`
Have this error message also when updating but only with display ESPs.
You are right. I've removed the display and updated successfully
Have this error message also when updating but only with display ESPs.
Yes seems to be display / font related . Removed display & font from yaml and could upgrade
Same issue after editting yaml and putting fonts and display back in.
Solution, remove gfonts and do local font
- file: "Roboto-Bold.ttf"
id: bold
size: 60```
Would be nice, except I don't use gfonds, only locale.
Would be nice, except I don't use gfonds, only locale.
Worked for me. Try to change to different fonts maybe?
Have gone through all my local fonts and none work, must be another solution, worked before.
Now I even loaded the Roboto and this also does not work for me
I get the same error after changing to local fonts
Yes same here use local fonts. Tried changing to a default local font as well.
Same issue here. Tried switching fonts, didn't work.
Another thing (probably not related) is that on 2023.7.x there was a bug (with the animation component) that required insertion of some additional yaml to get it to compile successfully. I tried removing this code, but the issue still persists.
I get the same issue when trying to use Material Design icons
image:
- file: mdi:alert-outline
id: alert
resize: 80x80
I am having the same issue. after playing around with my yaml file, I found out the mdi files are causing the issue. If you remove all your mdi files then it should be ok. The display or fonts don't cause any problems (at least for me). reported it on Discord and I got this reply back from the developers:
"Until the container is fixed, you would have to get into the container and install the package yourself. Apt update Apt install ..."
To remove all mdi-files can not be the solution, was only introduced with one of the previous update, so important are the innovations in 2023.8.1 not that I can not wait until the bug is fixed. With the other ESPs there are no problems.
Does anyone know how to get into the container?
So far I've gone through
ssh -t hassio@localhost -p 22 "docker exec -it $(docker ps -f name=homeassistant -q) bash"
in order to gain access to the actual os
I'm using port 22 and with the SSH addon as I understand it the root user becomes hassioBut then I'm just returned to the main shell (albeit a new instance) where apt does not exist.
I tried apk add apt
but app is still not in my path
I installed all the cairo packages from apk list | grep cairo
and restarted everything and it still wont compile.
Any ideas?
Fixed by https://github.com/esphome/esphome/pull/5276. It will be in the next point release shortly.
The problem
Cannot compile or update previously working yaml
Which version of ESPHome has the issue?
ESPHome 2023.8.1
What type of installation are you using?
Home Assistant Add-on
Which version of Home Assistant has the issue?
2023.8.2
What platform are you using?
ESP32
Board
devkit
Component causing the issue
cairo?
Example YAML snippet
Anything in the logs that might be useful for us?
Additional information
New to ESPhome and HA so hope this is the correct place