Fresh install will not start

Hello,

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.

JP

Try with

pip install voluptuous==0.11.5

3 Likes

Thank you, that made the trick

pi@raspberrypi:~ $ sudo pip install voluptuous==0.11.5
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting voluptuous==0.11.5
  Downloading https://files.pythonhosted.org/packages/59/95/fa6218477c6999c9b7fdfab7c12c1bd4da2d5930f5eb2b232ec74eb344e7/voluptuous-0.11.5-py2.py3-none-any.whl
Installing collected packages: voluptuous
  Found existing installation: voluptuous 0.11.7
    Uninstalling voluptuous-0.11.7:
      Successfully uninstalled voluptuous-0.11.7
Successfully installed voluptuous-0.11.5
pi@raspberrypi:~ $ esphome config/ dashboard
INFO Starting dashboard web server on port 6052 and configuration dir config/...

Hum. when trying to compile a new version, I get:

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 have the same problem of e_jp
any ideas?
MArco

This worked for me!

and you compile builds?

anyone got an idea? I’m stuck at this point.

Here is an idea https://unix.stackexchange.com/questions/444102/loadlocale-c-nl-intern-locale-data-assertion-error

1 Like

Big thank you!

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.

You see this one already right? https://github.com/esphome/issues/issues/518#issuecomment-511393439

I found it at some point and tested it successfully. It was very late so I forgot to post about it.

However, I basically did the same thing differently the previous time. So I will wait until next HA update to see if it is a long term solution.

1 Like