ESPHome won't run

Hi All,

I feel like I’m probably missing something really obvious here but I’m failing at the starters gate in trying to get ESPHome to run. I have followed this tutorial on both a Windows 10 and a Ubuntu installation and in both cases I’m getting the following error launching ESPHome:

C:\Python27\Scripts>esphome
Traceback (most recent call last):
  File "c:\python27\lib\runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "c:\python27\lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\Python27\Scripts\esphome.exe\__main__.py", line 5, in <module>
  File "c:\python27\lib\site-packages\esphome\__main__.py", line 10, in <module>
    from esphome import const, writer, yaml_util
  File "c:\python27\lib\site-packages\esphome\writer.py", line 7, in <module>
    from esphome.config import iter_components
  File "c:\python27\lib\site-packages\esphome\config.py", line 15, in <module>
    from esphome import core, core_config, yaml_util
  File "c:\python27\lib\site-packages\esphome\core_config.py", line 6, in <module>
    import esphome.config_validation as cv
  File "c:\python27\lib\site-packages\esphome\config_validation.py", line 1242, in <module>
    Optional(CONF_COMMAND_TOPIC): All(requires_component('mqtt'), subscribe_topic),
  File "c:\python27\lib\site-packages\esphome\voluptuous_schema.py", line 198, in extend
    ret = super(_Schema, self).extend(schema, extra=extra)
  File "c:\python27\lib\site-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’m not really familiar with Python but I’m assuming this is nothing to do with the Python installation or paths as it is almost the same error dump on both Windows and Ubuntu. The line 162 - line 5 section is missing in Ubuntu but from line 10 down it is the same.

I’d be really grateful if anyone could provide advice on how to get this working.

Phil

Ah, sorry all. Just found this topic: Fresh install will not start

Seems to have fixed the issue. Not sure if there is a way of updating the tutorial page to add the extra step?

Phil

Right at the bottom of the page “edit this page on Github”


I tried to install esphome on my laptop as it seems I cannot compile from RPi (too little memory I guess?). I get a fine response on the “esphome version” command, but next when I try to execute anything its like the screenshot above. Any ideas anyone ?

Wrong syntax/command?

I would try something like

esphome run test.yaml

And what would be that?

Btw. your problem seems in no way related to the 4 year old thread you dugged out

image
Sorry if I highjacked a thread, one needs a degree to figure out the proper way : if you create a duplicate you annoy some, if you create a new one with same title you annoy others. One more area where I need to grow my judgement.


its weird. In the meantime I have upgraded my HA server to a RPi4 I had lying around, maybe the added RAM will allow me to run ESPHome and compilations from there. Although I may have encountered some hickups there too… but for sure that is another thread.

Try

esphome test.yaml run

Version 1.17 is simply ancient. Current is 2023.11.6

1 Like