Timeout Errors after training

Can anyone help me with this, please?

When I am training Rhasspy, I am getting TimeoutErrors over and over again. Rhasspy trains and trains and nothing happens. Eventually I get the timeout error.

EDIT: Oh, and what I just noticed: While training Rhasspy the Connection to HomeAssistant OS is lost. So obviously training Rhasspy is disturbing my HomeAsisstantOS as well.

Rhasspy 2.5.11 was running pretty fine up until now. (I run Rhasspy as Addon in HomeAssistantOS (up to date version).)

BUT I had a strange problem which I tried to solve: Some of my intents were recognized perfectly well, while others like asking for the time (Uhrzeit) were populated with a whole lot of weather-words not even close to the spoken sentence.

I had the suspicion that the weather-intent (copied from this forum), with a whole lot of words in the slot section (cities etc) overstrained Rhasspy.

So I deleted the weather part from the sentences.ini and the slots and trained Rhasspy. But then I ran in the timeout errors. Since then I could not train Rhasspy succesfully once.

Rhasspy still works, but the Uhrzeit/Time-Intent is still not recognized, but populated with the weather-words.

Here my Rhasspy-Logs after clicking on the “Train”-Button:

[ERROR:2022-11-17 00:50:46,065] rhasspyserver_hermes:
Traceback (most recent call last):
File “/usr/lib/rhasspy/.venv/lib/python3.7/site-packages/quart/app.py”, line 1821, in full_dispatch_request
result = await self.dispatch_request(request_context)
File “/usr/lib/rhasspy/.venv/lib/python3.7/site-packages/quart/app.py”, line 1869, in dispatch_request
return await handler(**request_.view_args)
File “/usr/lib/rhasspy/rhasspy-server-hermes/rhasspyserver_hermes/main.py”, line 1313, in api_train
result = await core.train()
File “/usr/lib/rhasspy/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 462, in train
timeout_seconds=self.training_timeout_seconds,
File “/usr/lib/rhasspy/rhasspy-server-hermes/rhasspyserver_hermes/init.py”, line 995, in publish_wait
result_awaitable, timeout=timeout_seconds
File “/usr/lib/python3.7/asyncio/tasks.py”, line 423, in wait_for
raise futures.TimeoutError()
concurrent.futures._base.TimeoutError
[DEBUG:2022-11-17 00:26:53,158] rhasspyserver_hermes: Handling NluTrainSuccess (topic=rhasspy/nlu/basis/trainSuccess, id=d8bbcd65-00c5-43cc-863a-5b7bb9512b15)
[DEBUG:2022-11-17 00:26:53,157] rhasspyserver_hermes: Handling NluTrainSuccess (topic=rhasspy/nlu/basis/trainSuccess, id=ed0f31f2-2e55-4f10-8c7d-d46beb6f84b6)
[DEBUG:2022-11-17 00:26:53,156] rhasspyserver_hermes: Handling NluTrainSuccess (topic=rhasspy/nlu/basis/trainSuccess, id=99bb16d5-5550-4525-9f51-13e3e768054c)
[DEBUG:2022-11-17 00:26:51,826] rhasspyserver_hermes: Publishing 13582 bytes(s) to rhasspy/nlu/basis/train
[DEBUG:2022-11-17 00:26:51,825] rhasspyserver_hermes: → NluTrain
[DEBUG:2022-11-17 00:26:51,807] rhasspyserver_hermes: Publishing 13582 bytes(s) to rhasspy/asr/basis/train
[DEBUG:2022-11-17 00:26:51,806] rhasspyserver_hermes: → AsrTrain
[DEBUG:2022-11-17 00:26:51,783] rhasspyserver_hermes: Finished writing /share/rhasspy/profiles/de/intent_graph.pickle.gz
[DEBUG:2022-11-17 00:26:48,497] rhasspyserver_hermes: Writing /share/rhasspy/profiles/de/intent_graph.pickle.gz
[DEBUG:2022-11-17 00:26:46,813] rhasspynlu.slots: Loading slot bringItems from /share/rhasspy/profiles/de/slots/bringItems
[DEBUG:2022-11-17 00:26:46,809] rhasspynlu.slots: Loading slot Zone from /share/rhasspy/profiles/de/slots/Zone
[DEBUG:2022-11-17 00:26:46,552] rhasspynlu.slots: Running program for slot rhasspy/number,1,120,1: [‘/usr/lib/rhasspy/rhasspy-profile/rhasspyprofile/profiles/de/slot_programs/rhasspy/number’, ‘1’, ‘120’, ‘1’]
[DEBUG:2022-11-17 00:26:46,549] rhasspynlu.slots: Loading slot Zimmer from /share/rhasspy/profiles/de/slots/Zimmer
[DEBUG:2022-11-17 00:26:46,547] rhasspynlu.slots: Loading slot Schalter from /share/rhasspy/profiles/de/slots/Schalter
[DEBUG:2022-11-17 00:26:46,287] rhasspynlu.slots: Running program for slot rhasspy/number,1,24,1: [‘/usr/lib/rhasspy/rhasspy-profile/rhasspyprofile/profiles/de/slot_programs/rhasspy/number’, ‘1’, ‘24’, ‘1’]
[DEBUG:2022-11-17 00:26:46,282] rhasspynlu.slots: Loading slot Lampe from /share/rhasspy/profiles/de/slots/Lampe
[DEBUG:2022-11-17 00:26:45,572] rhasspynlu.slots: Running program for slot rhasspy/number,1,30,1: [‘/usr/lib/rhasspy/rhasspy-profile/rhasspyprofile/profiles/de/slot_programs/rhasspy/number’, ‘1’, ‘30’, ‘1’]
[DEBUG:2022-11-17 00:26:45,534] rhasspynlu.ini_jsgf: Loaded ini file
[DEBUG:2022-11-17 00:26:45,524] rhasspyserver_hermes: Generating intent graph
[DEBUG:2022-11-17 00:26:45,515] rhasspyserver_hermes: Loading sentences from [PosixPath(‘/share/rhasspy/profiles/de/sentences.ini’)]
[INFO:2022-11-17 00:26:45,495] rhasspyserver_hermes: Starting training

Can anyone help me with this please?

I am happy to provide further logs or info if necessary.

Thank you!

I am new to rhasspy, just installed it 2 days ago.

However I ran into something similar when I added my own slot program that pulled in all my switches and lights dynamically from home assistant. One of the entity names had a character in the friendly name that caused issues during training. It took me a bit to track down but once I renamed the entity everything has been working great. So I would suggest working backwards and remove all slot programs and slot files one at a time until you find the culprit. You just need to bi-sect the problem area until you get back to a working state. Once you narrow down the problem I am sure we can help you work on a solution.

1 Like

Thank you very much!

That might be possible. I tried to use a slot program from the community here (right now I am not able to find which it was.)

But does your solution mean I will have to rename all my friendly names in german like “Küche”, which have mutated vowels / Umlaute?

I will try your solution now. Although I already encountered an issue that after removing an intent and the referred slot, the words from it are still recognized by rhasspy, leading to a lot of misunderstandings with some intents.

When I was triaging my issue; I just disabled half my sentences at a time until I narrowed it down. Remember these are only temporary hacks so don’t delete anything; and yes things won’t work properly until you restore everything. For example if you know “certain” items have always worked then skip those and focus on items you are unsure about. It very well could be the slot program you pulled from the community.

1 Like

hm. I just tried to disable my slot program for test reasons. So I moved the slot_programs-folder out of my profile-directory. Then restarted rhasspy an retrained. Still the timeout error.

okay, this is weird:

I deleted all my intents/sentences exept for [GetTime]. And I still get the timeout error.

It’s very possible it’s something that was added to one of your slots?

Did you do a power cycle, or just a restart ?

I recently had a problem with node-RED continuing to run despite the Home Assistant add-on claiming that it couldn’t be started. Then I realised that they were both running in different Docker containers, and a power cycle re-synchronised them.