AssertionError when training,

Hello everyone,

I am in need of some help before my wall crumbles down completely after repeatedly hitting my head against it in frustration :).

I have followed the guide from Everything Smart Home Local Voice Control With Home Assistant Just Got Easier! - YouTube to the Letter, but i am stuck on a the part where i need to train Rhasspy and let him load the entities from HA, I think, I have actually checked to see if the script loaded properly in
share/rhasspy/profiles/en/slot_programs/hass/entities and it is the exact same as on the GitHub so that should be correct i believe.
Before i had an error with failed authentication but I already fixed that with an https Hass Url and i no longer see this error on HA logs.
But now i still get the error you see below and I have checked forums and wiki for any solution but I cannot find one that fixes it for me. I found people with the similar base error but they also have extra error 's that i don’t have which would make it more obvious.

So i hope one of you is able to help me out with this, before i go crazy :slight_smile: , would be much appreciated!!


[ERROR:2022-08-24 23:29:38,721] rhasspyserver_hermes: No output from ['/share/rhasspy/profiles/en/slot_programs/hass/entities', 'light']
Traceback (most recent call last):
  File "/usr/lib/rhasspy/.venv/lib/python3.7/site-packages/quart/", line 1821, in full_dispatch_request
    result = await self.dispatch_request(request_context)
  File "/usr/lib/rhasspy/.venv/lib/python3.7/site-packages/quart/", line 1869, in dispatch_request
    return await handler(**request_.view_args)
  File "/usr/lib/rhasspy/rhasspy-server-hermes/rhasspyserver_hermes/", line 1313, in api_train
    result = await core.train()
  File "/usr/lib/rhasspy/rhasspy-server-hermes/rhasspyserver_hermes/", line 365, in train
  File "/usr/lib/rhasspy/rhasspy-server-hermes/rhasspyserver_hermes/", line 87, in sentences_to_graph
  File "/usr/lib/rhasspy/rhasspy-nlu/rhasspynlu/", line 98, in get_slot_replacements
    assert has_output, f"No output from {slot_command}"
AssertionError: No output from ['/share/rhasspy/profiles/en/slot_programs/hass/entities', 'light']
[DEBUG:2022-08-24 23:29:38,669] rhasspynlu.slots: Running program for slot hass/entities,light: ['/share/rhasspy/profiles/en/slot_programs/hass/entities', 'light']
[DEBUG:2022-08-24 23:29:38,661] rhasspynlu.slots: Loading slot hass/colors from /share/rhasspy/profiles/en/slots/hass/colors
[DEBUG:2022-08-24 23:29:38,655] rhasspynlu.ini_jsgf: Loaded ini file
[DEBUG:2022-08-24 23:29:38,653] rhasspyserver_hermes: Generating intent graph
[DEBUG:2022-08-24 23:29:38,652] rhasspyserver_hermes: Loading sentences from [PosixPath('/share/rhasspy/profiles/en/sentences.ini'), PosixPath('/share/rhasspy/profiles/en/intents/home_assistant.ini')]
[INFO:2022-08-24 23:29:38,651] rhasspyserver_hermes: Starting training
1 Like

Do you actually have lights? Maybe that is the issue

Dankje Romkabouter,

I get you asking this question to be sure, but yeah i obviously checked this firstly :smiley: i have multiple Light entities and even checked their ID’s for weird characters and fixed that, even with that i still have issues.

Did you find a solution to fix this problem
I have the same issue
AssertionError: Missing slot $hass/entities,light
And I do have a light entitie
Also I create a slot hass/entities and enter all my HA entities from the list and still have the same error

I’m also having the same problem when trying to train Rhasspy on Home Assistant (VM). Hoping that someone might know how to fix this.

Hi guys,

I have not found a solution for the fix with using the automatic script.

However if you manually add the entities in the slots they work like a charm.
@ZeniaBol if you go manually you need to make sure you remove the script from your system. because that is what causes this error for me atleast. It will keep calling that script every time you hit “Tain”.

I would still love a solution for the auto script, but I’m no pro coder :).

Will try. TY
I am not a programmer at all
So far I can’t make it work.

You will need to make sure you call the correct function when writing the sentences for example when using hass/lights as a slot name you need to call them in the sentences as ($hass/lights){name}. Since the intents for light are already in the HA they should work when you call them.

You still need some bit of manual “coding” work if you really want this to do anything more fancy then just toggling lights. make sure you read the docs for sentences and intents: Training - Rhasspy

Thank you
Will try to do this
Need to read docs a little be more to understand what to do

Hi, im also getting the “AssertionError: Missing slot $hass/entities,light”

Seems to me like the script is not getting the entities. I also would have expected that a new slot file appears after running the script, but in the video from everything smart home you cant directly see that…

Hey all,

I am just now starting to play around with this, wow lots to learn still. Currently I have installed this for my docker Home Assistant instance, so I don’t know if this will help you all or not, but I did the following:

I created a slot called “hass/entities” with the following: (I am not sure you need this, so please test without it and let me know)


and for the homeassistant.ini file I have this;

lights = $hass/entities
switches = $hass/entities
entities = <lights> | <switches>
turn on [the] (<entities>){name}

turn off [the] (<HassTurnOn.entities>){name}

covers = $hass/entities
open [the] (<covers>){name}

close [the] (<HassOpenCover.covers>){name}

entities = <HassTurnOn.entities> | <HassOpenCover.covers>
toggle [the] (<entities>){name}

set [the] (<HassTurnOn.lights>){name} [color] to ($hass/colors){color}
set [the] (<HassTurnOn.lights>){name} brightness to (0..100){brightness}
set [the] (<HassTurnOn.lights>){name} to (0..100){brightness} percent brightness

This has been working for me, hope this helps someone.

1 Like

I encountered this same problem. It turned out to be the URL in profile.json was wrong.

The example says
This didn’t work for me. What worked was only <hostname>:8123 Worked after that.

thanks for this, it fixed my problem !