Problem getting response from Snips

I have been working on and off for probably the better part of a year trying to get Snips working on Ubuntu 18.04 as the base and on a Raspberry Pi Zero W as a Satellite.

I’ve started over a few times as I’ve dug some pretty deep holes. I’m still running into problems getting over what appears to be the final hurdle.

I have hotword detection, I have captured questions and processing happens but then it errors out instead of responding.

error:

session with id ‘394724cb-138a-4d7e-aaf2-eb6605fdfbc4’ was ended on site Kitchen. The session timed out because its continuation or termin ation was not handled by any running action code.

Currently I have the Demo installed and when I ask what the "Weather will be tomorrow’

Here is the full output of Snips-Watch -vvv

[16:55:53] Watching on 192.168.1.105:1883 (MQTT)
[16:56:04] [Hotword] detected on site Kitchen, for model hey_snips
[16:56:04] [Asr] was asked to stop listening on site Kitchen
[16:56:04] [Hotword] was asked to toggle itself ‘off’ on site Kitchen
[16:56:04] [Dialogue] session with id ‘394724cb-138a-4d7e-aaf2-eb6605fdfbc4’ was started on site Kitchen
[16:56:04] [AudioServer] was asked to play a wav of 41.1 kB with id ‘40b04075-2f3b-439e-b8fb-167b3d7ccf30’ on site Kitchen
[16:56:05] [AudioServer] finished playing wav with id ‘40b04075-2f3b-439e-b8fb-167b3d7ccf30’
[16:56:05] [Asr] was asked to listen on site Kitchen
[16:56:09] [Asr] captured text “what the weather tomorrow” in 3.0s
[16:56:09] [Asr] was asked to stop listening on site Kitchen
[16:56:09] [AudioServer] was asked to play a wav of 93.1 kB with id ‘92238062-848b-4398-83e4-f0f11f7d1d6e’ on site Kitchen
[16:56:10] [AudioServer] finished playing wav with id ‘92238062-848b-4398-83e4-f0f11f7d1d6e’
[16:56:10] [Nlu] was asked to parse input “what the weather tomorrow”
[16:56:10] [Nlu] detected intent searchWeatherForecast with confidence score 0.962 for input “what the weather tomorrow”
Slots ->
forecast_start_datetime -> 2019-10-24 00:00:00 +00:00 (confidence: 1.000)
[16:56:10] [Dialogue] New intent detected searchWeatherForecast with confidence 0.962
Slots ->
forecast_start_datetime -> 2019-10-24 00:00:00 +00:00 (confidence: 1.000)
[16:56:16] [Dialogue] session with id ‘394724cb-138a-4d7e-aaf2-eb6605fdfbc4’ was ended on site Kitchen. The session timed out because its continuation or termination was not handled by any running action code.
[16:56:16] [Asr] was asked to stop listening on site Kitchen
[16:56:16] [Hotword] was asked to toggle itself ‘on’ on site Kitchen

I redeployed my Assistant with Greetings by SirBuildsALot7 and I am getting the same error when I say ‘Hello’ or ‘Bye’. here is the relevant snippet from snip-watch -vvv

[15:58:45] [Asr] captured text “hello” in 4.0s
[15:58:45] [Asr] was asked to stop listening on site Kitchen
[15:58:45] [AudioServer] was asked to play a wav of 93.1 kB with id ‘e3469d34-856b-4304-af09-712386a6e542’ on site Kitchen
[15:58:47] [AudioServer] finished playing wav with id ‘e3469d34-856b-4304-af09-712386a6e542’
[15:58:47] [Nlu] was asked to parse input “hello”
[15:58:47] [Nlu] detected intent SirBuildsALot7:hello with confidence score 1.000 for input “hello”
Slots ->
hello -> hello (confidence: 1.000)
[15:58:47] [Dialogue] New intent detected SirBuildsALot7:hello with confidence 1.000
Slots ->
hello -> hello (confidence: 1.000)
[15:58:52] [Dialogue] session with id ‘0daab88c-56c2-4a8d-b659-e376e17d7c3a’ was ended on site Kitchen. The session timed out because its continuation or termination was not handled by any running action code.

Syslog for my base during this time is:

Oct 24 16:05:02 heimdall snips-asr[1909]: INFO:snips_asr_lib::asr : T0+3.543 capture ended
Oct 24 16:05:02 heimdall snips-asr[1909]: INFO:snips_asr_lib::asr : T0+3.544 decoder finalized
Oct 24 16:05:02 heimdall snips-asr[1909]: INFO:snips_asr_lib::asr : T0+3.546 lookup and post-processing done
Oct 24 16:05:02 heimdall snips-asr[1909]: INFO:snips_asr_lib::asr : decoded: [Recognition { decoded_string: “hello”, likelihood: 1.0, tokens: Some([Token { value: “hello”, confidence: 1.0, time: (0.0, 3.36), range: 0…5 }]) }]
Oct 24 16:05:02 heimdall snips-asr[1909]: INFO:snips_asr_hermes::handler : Publishing the recognition
Oct 24 16:05:02 heimdall snips-asr[1909]: INFO:snips_asr_hermes::handler : Preparing decoder
Oct 24 16:05:04 heimdall snips-tts[1917]: INFO:snips_tts_hermes: Received a play finished message from audio server with an unknown id ‘8e08ec8d-5bb5-45a1-9d67-6c3e54102539’. Ignoring it.
Oct 24 16:05:09 heimdall snips-dialogue[1923]: INFO:snips_dialogue_lib::coordinator::coordinator: Session [28b219f5-01a4-4ba7-bec4-152a2170580f]: closing session which was active: Timeout { component: Some(ClientApp) }
Oct 24 16:05:09 heimdall snips-dialogue[1923]: INFO:snips_dialogue_lib::coordinator::coordinator: Site [Kitchen]: reset site -> turn off ASR and turn on Hotword

and syslog on my Satellite for the same time period:

Oct 24 17:04:58 Kitchen snips-satellite[482]: INFO:snips_hotword_hermes : Hotword detected: site_id:Kitchen model:hey_snips (65ms ago)
Oct 24 17:04:58 Kitchen snips-satellite[482]: INFO:snips_hotword_lib::audio : Audio thread for site Kitchen stopped.
Oct 24 17:04:58 Kitchen snips-satellite[482]: INFO:snips_audio_alsa::playback : Using ALSA output None ("") for “c9c88f07-6283-4aa8-9354-ac9018a04a65”, WavSpec { channels: 2, sample_rate: 22050, bits_per_sample: 16, sample_format: Int }
Oct 24 17:04:59 Kitchen snips-satellite[482]: INFO:snips_audio_alsa::playback : Playback for c9c88f07-6283-4aa8-9354-ac9018a04a65 finished
Oct 24 17:05:02 Kitchen snips-satellite[482]: INFO:snips_audio_alsa::playback : Using ALSA output None ("") for “8e08ec8d-5bb5-45a1-9d67-6c3e54102539”, WavSpec { channels: 2, sample_rate: 22050, bits_per_sample: 16, sample_format: Int }
Oct 24 17:05:04 Kitchen snips-satellite[482]: INFO:snips_audio_alsa::playback : Playback for 8e08ec8d-5bb5-45a1-9d67-6c3e54102539 finished

The errors suggest the assistant was not installed properly. How did you install it?

By following the docs here: https://docs.snips.ai/articles/console/actions/deploy-your-assistant

There are multiple sets of instructions there. Which one? :slight_smile:

Another possibility is that snips-skill-server isn’t running. I’d double-check that, too.

These steps specifically https://docs.snips.ai/articles/console/actions/deploy-your-assistant#deploy-your-assistant-manually-without-sam

The I followed these steps: https://docs.snips.ai/articles/console/actions/deploying-your-skills#deploy-manually-without-sam

snips-skill-server is/was running

What’s in /var/lib/snips/skills ?

I’d point out that I’ve had just about every problem I could find a way to cause so far. :slight_smile: But I can say the vast majority were caused by me.

Hi @Hav0ck,

The good news is that the snips platform is running correctly.

No you need to ensure that your action code is running correctly.

You are using code snippets written in the console right? If so, you need to render your action code using snips-template.

If it still does not work, please post here the logs of the skill server and as @franc said, check the contents of the skills folder.

sudo systemctl stop snips-skill-server
sudo -u _snips-skills snips-skill-server -v

So I just installed a new assistant with Greetings by SirBuildALot7. Here is the contents of /var/lib/snips/skills:

SirBuildsALot7.Greetings

Here is the output:

[17:44:03.334366] DEBUG:snips_common_cli::cli: conf lookup: snips-skill-server.no_exit_on_all_panics -> Ok(None)
[17:44:03.334836] DEBUG:snips_common_cli::cli: conf lookup: snips-common.no_exit_on_all_panics -> Ok(None)
[17:44:03.335272] DEBUG:snips_common_cli::cli: conf lookup: snips-skill-server.skill_dir -> Ok(None)
[17:44:03.335410] DEBUG:snips_common_cli::cli: conf lookup: snips-common.skill_dir -> Ok(None)
[17:44:03.335553] DEBUG:snips_common_cli::cli: conf lookup: snips-skill-server.skills_root_dir -> Ok(None)
[17:44:03.335692] DEBUG:snips_common_cli::cli: conf lookup: snips-common.skills_root_dir -> Ok(None)
[17:44:03.335938] INFO :snips_skill_server_lib::runner: searching dir for actions: /var/lib/snips/skills/SirBuildsALot7.Greetings
[17:44:03.336178] INFO :snips_skill_server_lib::runner: found action "/var/lib/snips/skills/SirBuildsALot7.Greetings/action-SirBuildsALot7-bye-SirBuildsALot7.Greetings.py"
[17:44:03.336358] INFO :snips_skill_server_lib::runner: found action "/var/lib/snips/skills/SirBuildsALot7.Greetings/action-SirBuildsALot7-hello-SirBuildsALot7.Greetings.py"
[17:44:03.338071] DEBUG:snips_skill_server_lib::runner: [SirBuildsALot7-bye-SirBuildsALot7.Greetings][err] thread started
[17:44:03.338717] DEBUG:snips_skill_server_lib::runner: [SirBuildsALot7-bye-SirBuildsALot7.Greetings][out] thread started
[17:44:03.338915] DEBUG:snips_skill_server_lib::runner: [SirBuildsALot7-hello-SirBuildsALot7.Greetings][err] thread started
[17:44:03.339218] DEBUG:snips_skill_server_lib::runner: [SirBuildsALot7-hello-SirBuildsALot7.Greetings][out] thread started
^C[17:44:38.207041] INFO :snips_skill_server_lib::runner: [SirBuildsALot7-bye-SirBuildsALot7.Greetings][err] Traceback (most recent call last):
[17:44:38.207105] INFO :snips_skill_server_lib::runner: [SirBuildsALot7-bye-SirBuildsALot7.Greetings][err]   File "./action-SirBuildsALot7-bye-SirBuildsALot7.Greetings.py", line 45, in <module>
[17:44:38.207126] INFO :snips_skill_server_lib::runner: [SirBuildsALot7-bye-SirBuildsALot7.Greetings][err]     h.subscribe_intent("SirBuildsALot7:bye", subscribe_intent_callback) \
[17:44:38.207142] INFO :snips_skill_server_lib::runner: [SirBuildsALot7-bye-SirBuildsALot7.Greetings][err]   File "/var/lib/snips/skills/SirBuildsALot7.Greetings/venv/local/lib/python2.7/site-packages/hermes_python/hermes.py", line 421, in start
[17:44:38.207273] INFO :snips_skill_server_lib::runner: [SirBuildsALot7-bye-SirBuildsALot7.Greetings][err]     self.loop_forever()
[17:44:38.207298] INFO :snips_skill_server_lib::runner: [SirBuildsALot7-bye-SirBuildsALot7.Greetings][err]   File "                                      /var/lib/snips/skills/SirBuildsALot7.Greetings/venv/local/lib/python2.7/site-packages/hermes_python/hermes.py", line 431, in loop_forever
[17:44:38.207315] INFO :snips_skill_server_lib::runner: [SirBuildsALot7-bye-SirBuildsALot7.Greetings][err]     sleep(.1)
[17:44:38.207329] INFO :snips_skill_server_lib::runner: [SirBuildsALot7-bye-SirBuildsALot7.Greetings][err] Keyboard Interrupt
[17:44:38.207508] INFO :snips_skill_server_lib::runner: [SirBuildsALot7-hello-SirBuildsALot7.Greetings][err] Traceback (most recent call last):
[17:44:38.207610] INFO :snips_skill_server_lib::runner: [SirBuildsALot7-hello-SirBuildsALot7.Greetings][err]   File "./action-SirBuildsALot7-hello-SirBuildsALot7.Greetings.py", line 45, in <module>
[17:44:38.207799] INFO :snips_skill_server_lib::runner: [SirBuildsALot7-hello-SirBuildsALot7.Greetings][err]     h.subscribe_intent("SirBuildsALot7:hello", subscribe_intent_callback) \
[17:44:38.207942] INFO :snips_skill_server_lib::runner: [SirBuildsALot7-hello-SirBuildsALot7.Greetings][err]   File "/var/lib/snips/skills/SirBuildsALot7.Greetings/venv/local/lib/python2.7/site-packages/hermes_python/hermes.py", line 421, in start
[17:44:38.208196] INFO :snips_skill_server_lib::runner: [SirBuildsALot7-hello-SirBuildsALot7.Greetings][err]     self.loop_forever()
[17:44:38.208308] INFO :snips_skill_server_lib::runner: [SirBuildsALot7-hello-SirBuildsALot7.Greetings][err]   File "/var/lib/snips/skills/SirBuildsALot7.Greetings/venv/local/lib/python2.7/site-packages/hermes_python/hermes.py", line 431, in loop_forever
[17:44:38.208516] INFO :snips_skill_server_lib::runner: [SirBuildsALot7-hello-SirBuildsALot7.Greetings][err] sleep(.1)
[17:44:38.208689] INFO :snips_skill_server_lib::runner: [SirBuildsALot7-hello-SirBuildsALot7.Greetings][err] KeyboardInterrupt
[17:44:38.214558] DEBUG:snips_skill_server_lib::runner: [SirBuildsALot7-bye-SirBuildsALot7.Greetings][out] thread stopped
[17:44:38.214592] DEBUG:snips_skill_server_lib::runner: [SirBuildsALot7-bye-SirBuildsALot7.Greetings][err] thread stopped
[17:44:38.216382] DEBUG:snips_skill_server_lib::runner: [SirBuildsALot7-hello-SirBuildsALot7.Greetings][out] thread  stopped
[17:44:38.216416] DEBUG:snips_skill_server_lib::runner: [SirBuildsALot7-hello-SirBuildsALot7.Greetings][err] thread stopped
[17:44:38.244901] INFO :snips_skill_server_lib::runner: was asked to stop, terminating childs before quitting...
[17:44:38.245065] DEBUG:snips_skill_server_lib::handler::nosandbox: sending kill to SirBuildsALot7-bye-SirBuildsALot7.Greetings
[17:44:38.245202] DEBUG:snips_skill_server_lib::handler::nosandbox: sending kill to SirBuildsALot7-hello-SirBuildsALot7.Greetings
[17:44:38.245317] DEBUG:snips_skill_server_lib::handler::nosandbox: waiting for SirBuildsALot7-bye-SirBuildsALot7.Greetings to stop
[17:44:38.245438] DEBUG:snips_skill_server_lib::handler::nosandbox: SirBuildsALot7-bye-SirBuildsALot7.Greetings has stopped
[17:44:38.245552] DEBUG:snips_skill_server_lib::handler::nosandbox: waiting for SirBuildsALot7-hello-SirBuildsALot7.Greetings to stop
[17:44:38.245692] DEBUG:snips_skill_server_lib::handler::nosandbox: SirBuildsALot7-hello-SirBuildsALot7.Greetings has stopped

I will note that I have Home Assistant running.
I installed the Weather app by ‘snips’ and was able to get Home Assistant to respond using their Snips Integration.

I’ve tried now with TimesTables_En and Timer_En with the same results.

The issue is the skills, the log entries don’t make any sense to me.

I will say that Home Assistant is more than happy to respond to intents if I create them.

I’m going to make the assumption that there is a problem with the Skill Server when it’s not running on a Pi.

It seems that there is no response from the Skill Server when an intent is detected. I have setup a number of intents to turn on and off various lights around the house, and one to read the weather forecast. These intents are being handled by Home Assistant.

The intents targeted at Snips just don’t work, well Snips see’s them but just seems to ignore them