I had to do a fresh reinstall after a SD card crash. I followed the few installation steps from the “Getting Started with ESPHome” without any major issue. Now I’m trying to start the console but it fails on this:
pi@raspberrypi:~ $ esphome config/ dashboard
Traceback (most recent call last):
File "/usr/local/bin/esphome", line 6, in <module>
from esphome.__main__ import main
File "/home/pi/.local/lib/python2.7/site-packages/esphome/__main__.py", line 10, in <module>
from esphome import const, writer, yaml_util
File "/home/pi/.local/lib/python2.7/site-packages/esphome/writer.py", line 7, in <module>
from esphome.config import iter_components
File "/home/pi/.local/lib/python2.7/site-packages/esphome/config.py", line 15, in <module>
from esphome import core, core_config, yaml_util
File "/home/pi/.local/lib/python2.7/site-packages/esphome/core_config.py", line 6, in <module>
import esphome.config_validation as cv
File "/home/pi/.local/lib/python2.7/site-packages/esphome/config_validation.py", line 1242, in <module>
Optional(CONF_COMMAND_TOPIC): All(requires_component('mqtt'), subscribe_topic),
File "/home/pi/.local/lib/python2.7/site-packages/esphome/voluptuous_schema.py", line 198, in extend
ret = super(_Schema, self).extend(schema, extra=extra)
File "/usr/local/lib/python2.7/dist-packages/voluptuous/schema_builder.py", line 782, in extend
return result_cls(result, required=result_required, extra=result_extra)
TypeError: __init__() got an unexpected keyword argument 'required'
I tried to solve it but this is above my skills. Thank you for your help.
LDF Modes: Finder ~ chain, Compatibility ~ soft
Looking for Update library in registry
Warning! Library `{'requirements': None, 'name': 'Update'}` has not been found in PlatformIO Registry.
You can ignore this message, if `{'requirements': None, 'name': 'Update'}` is a built-in library (included in framework, SDK). E.g., SPI, Wire, etc.
Found 27 compatible libraries
Scanning dependencies...
…
Compiling .pioenvs/node1/src/esphome/components/api/basic_messages.cpp.o
as: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))' failed.
xtensa-lx106-elf-g++: internal compiler error: Aborted (program as)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
as: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))' failed.
xtensa-lx106-elf-g++: internal compiler error: Aborted (program as)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
*** [.pioenvs/node1/src/esphome/components/api/api_message.cpp.o] Error 4
*** [.pioenvs/node1/src/esphome/components/adc/adc_sensor.cpp.o] Error 4
as: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))' failed.
xtensa-lx106-elf-g++: internal compiler error: Aborted (program as)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
as: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))' failed.
xtensa-lx106-elf-g++: internal compiler error: Aborted (program as)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
*** [.pioenvs/node1/src/esphome/components/api/api_server.cpp.o] Error 4
*** [.pioenvs/node1/src/esphome/components/api/basic_messages.cpp.o] Error 4
========================================================== [FAILED] Took 17.92 seconds ==========================================================
I don’t know why but the default locales on my Pi is causing this issue. (in fact all my Pies have the same locales).
So using sudo dpkg-reconfigure locales, I removed en_GB.UTF-8 and added en_CA.UTF-8 (and en_US.UTF-8 just in case)
back on this. Yesterday I was able to compile a firmware for a Sonoff basic.
This morning I try to compile another Sonoff basic and I get :
Compiling .pioenvs/sonoff02/src/esphome/components/api/command_messages.cpp.o
as: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))' failed.
xtensa-lx106-elf-g++: internal compiler error: Aborted (program as)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
as: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))' failed.
xtensa-lx106-elf-g++: internal compiler error: Aborted (program as)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
as: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))' failed.
xtensa-lx106-elf-g++: internal compiler error: Aborted (program as)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
*** [.pioenvs/sonoff02/src/esphome/components/api/api_message.cpp.o] Error 4
*** [.pioenvs/sonoff02/src/esphome/components/api/basic_messages.cpp.o] Error 4
*** [.pioenvs/sonoff02/src/esphome/components/api/command_messages.cpp.o] Error 4
as: loadlocale.c:130: _nl_intern_locale_data: Assertion `cnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))' failed.
xtensa-lx106-elf-g++: internal compiler error: Aborted (program as)
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
*** [.pioenvs/sonoff02/src/esphome/components/api/api_server.cpp.o] Error 4
Only difference is I did a sudo apt-get update / sudo apt-get -y upgrade before.
I tried to reconfigure locales (that didn’t changed since last time) with no luck.
I know this problem prevents you from using ESPHome, but this is not ESPHome specific issue, even though you might find an answer here, you might get your answer from other place completely unrelated to ESPHome.
I still don’t get why a fresh install is failing. Also during the compilation I saw a few messages about using deprecated modules. I will try to understand what is going on.