Yet another "The session was ended because one of the component didn't respond in a timely manner"

raspberry
#1

I’ve already read a couple of url=https://forum.snips.ai/t/dialogue-session-didnt-respond-in-a-timely-manner/176/4]threads[/url] from people with the same issue, but no solution for me.

I get the following error: The session was ended because one of the component didn't respond in a timely manner.

No errors in syslog:

Mar 12 17:52:16 raspberrypi snips-asr[12033]: INFO:snips_asr_lib::asr        : decoded: [Recognition { decoded_string: "what \'s the weather going to be tomorrow in chicago", likelihood: 1.0, tokens: Some([Token { value: "what", confidence: 1.0, time: (0.0, 0.98999995), range: 0..4 }, Token { value: "\'s", confidence: 1.0, time: (0.98999995, 1.0799999), range: 5..7 }, Token { value: "the", confidence: 1.0, time: (1.0799999, 1.38), range: 8..11 }, Token { value: "weather", confidence: 1.0, time: (1.38, 1.56), range: 12..19 }, Token { value: "going", confidence: 1.0, time: (1.56, 1.86), range: 20..25 }, Token { value: "to", confidence: 1.0, time: (1.86, 1.9499999), range: 26..28 }, Token { value: "be", confidence: 1.0, time: (1.9499999, 2.28), range: 29..31 }, Token { value: "tomorrow", confidence: 1.0, time: (2.28, 2.73), range: 32..40 }, Token { value: "in", confidence: 1.0, time: (2.73, 2.82), range: 41..43 }, Token { value: "chicago", confidence: 1.0, time: (2.82, 4.2), range: 44..51 }]) }]
Mar 12 17:52:16 raspberrypi snips-asr[12033]: INFO:snips_asr_hermes          : Cleanup
Mar 12 17:52:16 raspberrypi snips-asr[12033]: INFO:snips_asr_hermes          : Preparing decoder
Mar 12 17:52:16 raspberrypi snips-audio-server[12035]: INFO:snips_audio_portaudio      : Playing "2691d342-7ccb-4ff7-b95e-2aa36d41aa91" using output "default", wav spec: WavSpec { channels: 2, sample_rate: 22050, bits_per_sample: 16, sample_format: Int }
Mar 12 17:52:17 raspberrypi snips-asr[12033]: INFO:snips_asr_hermes          : Idle
Mar 12 17:52:17 raspberrypi snips-audio-server[12035]: INFO:snips_audio_portaudio      : Playing of "2691d342-7ccb-4ff7-b95e-2aa36d41aa91" finished
Mar 12 17:52:17 raspberrypi snips-tts[12017]: WARN:snips_tts_hermes: Received a "play finished" message from audio server with an unknown id '2691d342-7ccb-4ff7-b95e-2aa36d41aa91'. It could be normal if you have more than one audio server.
Mar 12 17:52:23 raspberrypi snips-dialogue[12026]: INFO:snips_dialogue_lib::coordinator::coordinator: Session [7922a739-61b2-4d3b-a7c9-12a9243c19b1]: closing session which was active: Timeout
Mar 12 17:52:23 raspberrypi snips-dialogue[12026]: INFO:snips_dialogue_lib::coordinator::coordinator: Site [default]: reset site -> turn off ASR and turn on Hotword
Mar 12 17:52:23 raspberrypi snips-hotword[12021]: INFO:snips_hotword_lib::audio    : Audio thread for site default started.

Nothing useful in snips-watch -vvv:

[17:52:16] [Asr] captured text "what 's the weather going to be tomorrow in chicago" in 4.0s
[17:52:16] [Asr] was asked to stop listening on site default
[17:52:16] [AudioServer] was asked to play a wav of 93.1 kB with id '2691d342-7ccb-4ff7-b95e-2aa36d41aa91' on site default
[17:52:17] [AudioServer] finished playing wav with id '2691d342-7ccb-4ff7-b95e-2aa36d41aa91'
[17:52:17] [Nlu] was asked to parse input "what 's the weather going to be tomorrow in chicago"
[17:52:17] [Nlu] detected intent searchWeatherForecast with confidence score 0.962 for input "what 's the weather going to be tomorrow in chicago"
              Slots ->
                 forecast_start_datetime -> 2019-03-13 00:00:00 +01:00 (confidence: 1.000)
                       forecast_locality -> Chicago (confidence: 1.000)
[17:52:17] [Dialogue] New intent detected searchWeatherForecast with confidence 0.962
              Slots ->
                 forecast_start_datetime -> 2019-03-13 00:00:00 +01:00 (confidence: 1.000)
                       forecast_locality -> Chicago (confidence: 1.000)
[17:52:23] [Dialogue] session with id '7922a739-61b2-4d3b-a7c9-12a9243c19b1' was ended on site default. The session was ended because one of the component didn't respond in a timely manner
[17:52:23] [Asr] was asked to stop listening on site default
[17:52:23] [Hotword] was asked to toggle itself 'on' on site default

I am running the apt install on a rpi, with the snips-platform-demo. Skills folder looks as described in the troubleshooting guide.

I have tried various skills from the store, but no luck.
Hope you guys can help out.

#2

Hi @Tystnad,

you can also output the services logs with the following command.

journalctl -u "snips-*" -f

Another thing that could help

It seems that the hotword, asr, nlu and dialog are OK

So, the culprit left are the other services such as snips-tts or snips-skills-server

If there is not enough logs in the output of journalctl, you can stop those services

sudo systemctl stop snips-tts snips-skill-server

and start them manually in a terminal

sudo -u _snips snips-tts -v

and in another terminal

sudo -u _snips snips-skill-server -v
#3

To be sure tough, did you install the demo with sam install demo?

#4

Ok, we found the issue.

Thanks for your feedback.

The version of hermes-python in https://github.com/snipsco/snips-skill-weather-tts/blob/master/requirements.txt was not up to date.

You can update the demo with

sam install demo
[SOLVED] N00b: no voice output for Weather skill?
#5

Hey @SakanaSan,

Thanks for your responses. I am running the manual installation through apt-get, not using sam right now.

I could not get sam to work with key-only ssh login.

Is there a way for me to update without sam? (or to get sam working on a pre-installed pi that is also running a couple of other things)

#6

It turns out, I have neither a command nor a service called snips-skill-server.

After installing (through apt-get), and starting it directly with -v, I get

[16:55:54.972482] DEBUG:snips_common_cli::cli: conf lookup: snips-skill-server.skill_dir -> Ok(None)
[16:55:54.972921] DEBUG:snips_common_cli::cli: conf lookup: snips-common.skill_dir -> Ok(None)
[16:55:54.973074] DEBUG:snips_common_cli::cli: conf lookup: snips-skill-server.skills_root_dir -> Ok(None)
[16:55:54.973203] DEBUG:snips_common_cli::cli: conf lookup: snips-common.skills_root_dir -> Ok(None)
[16:55:54.973485] ERROR:snips_skill_server   : failed to fetch skills
 -> caused by: didn't find any skills in root skills directorie(s) ["/var/lib/snips/skills"] nor skill directorie(s) []

Not sure why it would look there, I’d expect it to look in /usr/share/snips/skills.

#7

This output is normal when executing the skill server when no skill is installed.

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

prompt

[16:30:54.880240] DEBUG:snips_common_cli::cli: conf lookup: snips-skill-server.skill_dir -> Ok(None)
[16:30:54.880645] DEBUG:snips_common_cli::cli: conf lookup: snips-common.skill_dir -> Ok(None)
[16:30:54.880749] DEBUG:snips_common_cli::cli: conf lookup: snips-skill-server.skills_root_dir -> Ok(None)
[16:30:54.880873] DEBUG:snips_common_cli::cli: conf lookup: snips-common.skills_root_dir -> Ok(None)
[16:30:54.881096] ERROR:snips_skill_server   : failed to fetch skills
 -> caused by: didn't find any skills in root skills directorie(s) ["/var/lib/snips/skills"] nor skill directorie(s) []

/var/lib/snips/skills is the correct skills folder on debian based distribution

Did you execute the command sam install demo?
Can you then execute ls -la /var/lib/snips/skills and provide its output?

And also, to ensure that your installation is correct, can you provide the output of sam status?

#8

I am not using sam, I installed by

sudo apt-get update
sudo apt-get install -y dirmngr
sudo bash -c 'echo "deb https://raspbian.snips.ai/$(lsb_release -cs) stable main" > /etc/apt/sources.list.d/snips.list'
sudo apt-key adv --keyserver pgp.mit.edu --recv-keys D4F50CDCA10A2849
sudo apt-get update
sudo apt-get install -y snips-platform-voice

and
sudo apt-get install snips-platform-demo.

As described in the manual installation guide.

/var/lib/snips/skills is empty. There are however skills in /usr/share/snips/skills, put there by installing snips-platform-demo.

I also tried manually installing an assistent by
sudo unzip /home/pi/assistant.zip -d /usr/share/snips/ (as described in the manual linked above).

Is the manual incorrect?

#9

Ok, now I know which path you took :slight_smile:

The preferred way is to use SAM as it will give you useful shorthands to deal with the platform configuration.

Thanks for pointing it out, the manual installation tutorial is incomplete regarding the platform demo installation.
At this point, skills are not installed at the end of the setup procedure (its also weird that snips-skill-server is not installed)
We’ll handle that on our side asap

Meanwhile, check the following documentation: https://docs.snips.ai/articles/console/actions/deploying-your-skills#deploy-manually-without-sam

You’ll then see why its easier to use sam :confounded:

The skills you found in the /usr/share/snips/skills are code snippets. They need to be rendered into action skills. They are used when you add code in your app directly on the console.

In the case of the snips-weather-demo assistant, the following skill need to be retrieved from github: https://github.com/snipsco/snips-skill-weather-tts

(sam install demo simplify this procedure)

#10

Hi,

i have the same issue. My Snips don’t want to answer my ask.

This is my convesation with him :

[01:35:17] [Asr] was asked to stop listening on site **default**
[01:35:17] [Hotword] was asked to toggle itself 'on' on site **default**
[01:37:06] [Hotword] detected on site **default** , for model **hey_snips**
[01:37:06] [Asr] was asked to stop listening on site **default**
[01:37:06] [Hotword] was asked to toggle itself 'off' on site **default**
[01:37:06] [Dialogue] session with id '940d64db-0483-448c-aaa8-0a314d4084eb' was started on site **default**
[01:37:06] [AudioServer] was asked to play a wav of 41.1 kB with id '1e55ec7a-18d2-4de7-aa45-8bb19663f93b' on site **default**
[01:37:07] [AudioServer] finished playing wav with id '1e55ec7a-18d2-4de7-aa45-8bb19663f93b'
[01:37:07] [Asr] was asked to listen on site **default**
[01:37:09] [Asr] captured text " **quelle est la météo de demain** " in 2.0s
[01:37:09] [Asr] was asked to stop listening on site **default**
[01:37:09] [AudioServer] was asked to play a wav of 93.1 kB with id '148efd4f-e044-43d6-bc8c-52e79c53d834' on site **default**
[01:37:10] [AudioServer] finished playing wav with id '148efd4f-e044-43d6-bc8c-52e79c53d834'
[01:37:10] [Nlu] was asked to parse input "quelle est la météo de demain"
[01:37:11] [Nlu] detected intent **searchWeatherForecast** with confidence score **1.000** for input " **quelle est la météo de demain** "
**Slots** **->**
**forecast_start_datetime** **->** 2019-03-27 00:00:00 +01:00 (confidence: **1.000** )
**[01:37:11]** [Dialogue] New intent detected **searchWeatherForecast** with confidence **1.000**
**Slots** **->**
**forecast_start_datetime** **->** 2019-03-27 00:00:00 +01:00 (confidence: **1.000** )
[01:37:16] [Dialogue] session with id '940d64db-0483-448c-aaa8-0a314d4084eb' was ended on site **default** . The session was ended because one of the component didn't respond in a timely manner
[01:37:16] [Asr] was asked to stop listening on site **default**
[01:37:16] [Hotword] was asked to toggle itself 'on' on site **default**

and this is my log :

 pi@SnipsMaster:~ $ journalctl -u "snips-*" -f
    -- Logs begin at Tue 2019-03-26 00:17:37 CET. --
    Mar 26 01:37:09 SnipsMaster snips-asr[21720]: INFO:snips_asr_lib::asr        : decoded: [Recognition { decoded_string: "quelle est la météo de demain", likelihood: 0.7775685, tokens: Some([Token { value: "quelle", confidence: 0.48359835, time: (0.0, 0.32016158), range: 0..6 }, Token { value: "est", confidence: 0.74284315, time: (0.32016158, 0.43902424), range: 7..10 }, Token { value: "la", confidence: 0.98055357, time: (0.43902424, 0.62591624), range: 11..13 }, Token { value: "météo", confidence: 1.0, time: (0.62591624, 1.02), range: 14..19 }, Token { value: "de", confidence: 0.6274496, time: (1.02, 1.095294), range: 20..22 }, Token { value: "demain", confidence: 1.0, time: (1.095294, 2.1), range: 23..29 }]) }]
    Mar 26 01:37:09 SnipsMaster snips-asr[21720]: INFO:snips_asr_hermes          : Cleanup
    Mar 26 01:37:09 SnipsMaster snips-asr[21720]: INFO:snips_asr_hermes          : Preparing decoder
    Mar 26 01:37:09 SnipsMaster snips-audio-server[21719]: INFO:snips_audio_portaudio      : Playing "148efd4f-e044-43d6-bc8c-52e79c53d834" using output "default", wav spec: WavSpec { channels: 2, sample_rate: 22050, bits_per_sample: 16, sample_format: Int }
    Mar 26 01:37:10 SnipsMaster snips-asr[21720]: INFO:snips_asr_hermes          : Idle
    Mar 26 01:37:10 SnipsMaster snips-audio-server[21719]: INFO:snips_audio_portaudio      : Playing of "148efd4f-e044-43d6-bc8c-52e79c53d834" finished
    Mar 26 01:37:10 SnipsMaster snips-tts[21730]: INFO:snips_tts_hermes: Received a play finished message from audio server with an unknown id '148efd4f-e044-43d6-bc8c-52e79c53d834'. Ignoring it.
    Mar 26 01:37:16 SnipsMaster snips-dialogue[21734]: INFO:snips_dialogue_lib::coordinator::coordinator: Session [940d64db-0483-448c-aaa8-0a314d4084eb]: closing session which was active: Timeout
    Mar 26 01:37:16 SnipsMaster snips-dialogue[21734]: INFO:snips_dialogue_lib::coordinator::coordinator: Site [default]: reset site -> turn off ASR and turn on Hotword
    Mar 26 01:37:16 SnipsMaster snips-hotword[21728]: INFO:snips_hotword_lib::audio    : Audio thread for site default started.
#11

Hello @eliottinthesky,

Here’s a quick troubleshoot guide.

  • Make sure you went through the documentation first (e.g. actions)

  • Check if you have actions skills folders with scripts correctly installed in /var/lib/snips/skills

  • Stop your skill server (sudo systemctl stop snips-skill-server) and run it manually with verbose options to catch errors in the action code (sudo -u _snips-skills snips-skill-server -vv) .

  • If your skill-server is not installed, install it (sudo apt install snips-skill-server)

#12

Hi thx for reply.

  • I only have app with action in my console Snips

  • This in the content of /var/lib/snips/skills

pi@SnipsMaster : /var/lib/snips/skills $ ls
Quicestqui snips-HeureLocale snips-skill-respeaker
snips-app-say-it-again snips-skill-owm snips-skill-spotifywebapi

  • This is my logs
**pi@SnipsMaster** : **~ $** sudo -u _snips snips-skill-server -vv
[13:19:07.100998] DEBUG: **snips_common_cli::cli** : conf lookup: snips-skill-server.skill_dir -> Ok(None)
[13:19:07.101270] DEBUG: **snips_common_cli::cli** : conf lookup: snips-common.skill_dir -> Ok(None)
[13:19:07.101343] DEBUG: **snips_common_cli::cli** : conf lookup: snips-skill-server.skills_root_dir -> Ok(None)
[13:19:07.101406] DEBUG: **snips_common_cli::cli** : conf lookup: snips-common.skills_root_dir -> Ok(None)
[13:19:07.101936] INFO : **snips_skill_server_lib::runner** : searching dir for actions: /var/lib/snips/skills/snips-skill-respeaker
[13:19:07.102489] INFO : **snips_skill_server_lib::runner** : found action "/var/lib/snips/skills/snips-skill-respeaker/action-led_animation_1.6.3"
[13:19:07.102656] INFO : **snips_skill_server_lib::runner** : searching dir for actions: /var/lib/snips/skills/Quicestqui
[13:19:07.102950] INFO : **snips_skill_server_lib::runner** : searching dir for actions: /var/lib/snips/skills/snips-HeureLocale
[13:19:07.103274] INFO : **snips_skill_server_lib::runner** : found action "/var/lib/snips/skills/snips-HeureLocale/action-HeureLocale"
[13:19:07.103428] INFO : **snips_skill_server_lib::runner** : searching dir for actions: /var/lib/snips/skills/snips-app-say-it-again
[13:19:07.103910] INFO : **snips_skill_server_lib::runner** : found action "/var/lib/snips/skills/snips-app-say-it-again/action-say-it-again.py"
[13:19:07.104046] INFO : **snips_skill_server_lib::runner** : searching dir for actions: /var/lib/snips/skills/snips-skill-owm
[13:19:07.104466] INFO : **snips_skill_server_lib::runner** : found action "/var/lib/snips/skills/snips-skill-owm/action-owm.py"
[13:19:07.104616] INFO : **snips_skill_server_lib::runner** : searching dir for actions: /var/lib/snips/skills/.cache
[13:19:07.104801] ERROR: **snips_skill_server_lib::runner** : Error: GlobError { path: "/var/lib/snips/skills/.cache", error: Os { code: 13, kind: PermissionDenied, message: "Permission denied" } }
[13:19:07.104897] INFO : **snips_skill_server_lib::runner** : searching dir for actions: /var/lib/snips/skills/snips-skill-spotifywebapi
[13:19:07.105550] INFO : **snips_skill_server_lib::runner** : found action "/var/lib/snips/skills/snips-skill-spotifywebapi/action-spotifywebapi.py"
[13:19:07.107594] DEBUG: **snips_skill_server_lib::runner** : [led_animation_1.6][out] thread started
[13:19:07.108649] DEBUG: **snips_skill_server_lib::runner** : [led_animation_1.6][err] thread started
[13:19:07.111397] DEBUG: **snips_skill_server_lib::runner** : [HeureLocale][err] thread started
[13:19:07.112632] DEBUG: **snips_skill_server_lib::runner** : [HeureLocale][out] thread started
[13:19:07.113468] DEBUG: **snips_skill_server_lib::runner** : [say-it-again][err] thread started
[13:19:07.116079] DEBUG: **snips_skill_server_lib::runner** : [say-it-again][out] thread started
[13:19:07.118258] DEBUG: **snips_skill_server_lib::runner** : [owm][err] thread started
[13:19:07.119398] DEBUG: **snips_skill_server_lib::runner** : [owm][out] thread started
[13:19:07.120488] INFO : **snips_skill_server_lib::runner** : [led_animation_1.6][err] [Error] Can't open /dev/spidev0.0 (try 'sudo')[Error] Failed to open SPI! Retry [1] in 10 seconds. 
[13:19:07.127359] DEBUG: **snips_skill_server_lib::runner** : [spotifywebapi][err] thread started
[13:19:07.148394] DEBUG: **snips_skill_server_lib::runner** : [spotifywebapi][out] thread started
[13:19:07.356127] INFO : **snips_skill_server_lib::runner** : [HeureLocale][err] Traceback (most recent call last):
[13:19:07.356346] INFO : **snips_skill_server_lib::runner** : [HeureLocale][err] File "./action-HeureLocale", line 4, in <module>
[13:19:07.357171] INFO : **snips_skill_server_lib::runner** : [HeureLocale][err] import ConfigParser
[13:19:07.357400] INFO : **snips_skill_server_lib::runner** : [HeureLocale][err] ImportError: No module named 'ConfigParser'
[13:19:07.393058] DEBUG: **snips_skill_server_lib::runner** : [HeureLocale][out] thread stopped
[13:19:07.393051] DEBUG: **snips_skill_server_lib::runner** : [HeureLocale][err] thread stopped
[13:19:07.423906] WARN : **snips_skill_server_lib::handler::nosandbox** : child HeureLocale has stopped with status `exit code: 1`
[13:19:07.424105] INFO : **snips_skill_server_lib::runner** : restarting action HeureLocale (restart_fails: 0)
[13:19:07.429494] DEBUG: **snips_skill_server_lib::runner** : [HeureLocale][out] thread started
[13:19:07.429806] DEBUG: **snips_skill_server_lib::runner** : [HeureLocale][err] thread started
[13:19:07.675107] INFO : **snips_skill_server_lib::runner** : [HeureLocale][err] Traceback (most recent call last):
[13:19:07.675371] INFO : **snips_skill_server_lib::runner** : [HeureLocale][err] File "./action-HeureLocale", line 4, in <module>
[13:19:07.676275] INFO : **snips_skill_server_lib::runner** : [HeureLocale][err] import ConfigParser
[13:19:07.676586] INFO : **snips_skill_server_lib::runner** : [HeureLocale][err] ImportError: No module named 'ConfigParser'
[13:19:07.716324] DEBUG: **snips_skill_server_lib::runner** : [HeureLocale][err] thread stopped
[13:19:07.716662] DEBUG: **snips_skill_server_lib::runner** : [HeureLocale][out] thread stopped
[13:19:07.727858] WARN : **snips_skill_server_lib::handler::nosandbox** : child HeureLocale has stopped with status `exit code: 1`
[13:19:07.728071] INFO : **snips_skill_server_lib::runner** : restarting action HeureLocale (restart_fails: 1)
[13:19:07.732393] DEBUG: **snips_skill_server_lib::runner** : [HeureLocale][out] thread started
[13:19:07.736694] DEBUG: **snips_skill_server_lib::runner** : [HeureLocale][err] thread started
[13:19:07.923921] INFO : **snips_skill_server_lib::runner** : [HeureLocale][err] Traceback (most recent call last):
[13:19:07.924123] INFO : **snips_skill_server_lib::runner** : [HeureLocale][err] File "./action-HeureLocale", line 4, in <module>
[13:19:07.924809] INFO : **snips_skill_server_lib::runner** : [HeureLocale][err] import ConfigParser
[13:19:07.924968] INFO : **snips_skill_server_lib::runner** : [HeureLocale][err] ImportError: No module named 'ConfigParser'
[13:19:07.956204] DEBUG: **snips_skill_server_lib::runner** : [HeureLocale][err] thread stopped
[13:19:07.956352] DEBUG: **snips_skill_server_lib::runner** : [HeureLocale][out] thread stopped
[13:19:07.957577] INFO : **snips_skill_server_lib::runner** : [spotifywebapi][out] Get the cached token: OK
[13:19:07.957672] INFO : **snips_skill_server_lib::runner** : [spotifywebapi][out] [Error] No cached token find ! Gen the token with:
[13:19:07.957732] INFO : **snips_skill_server_lib::runner** : [spotifywebapi][out] python token-generator.py
[13:19:07.981626] WARN : **snips_skill_server_lib::handler::nosandbox** : child HeureLocale has stopped with status `exit code: 1`
[13:19:07.982169] INFO : **snips_skill_server_lib::runner** : restarting action HeureLocale (restart_fails: 2)
[13:19:07.988606] DEBUG: **snips_skill_server_lib::runner** : [HeureLocale][err] thread started
[13:19:07.988853] DEBUG: **snips_skill_server_lib::runner** : [HeureLocale][out] thread started
[13:19:08.016335] DEBUG: **snips_skill_server_lib::runner** : [spotifywebapi][out] thread stopped
[13:19:08.016335] DEBUG: **snips_skill_server_lib::runner** : [spotifywebapi][err] thread stopped
[13:19:08.035878] WARN : **snips_skill_server_lib::handler::nosandbox** : child spotifywebapi has stopped with status `exit code: 3`
[13:19:08.036079] INFO : **snips_skill_server_lib::runner** : restarting action spotifywebapi (restart_fails: 0)
[13:19:08.038616] DEBUG: **snips_skill_server_lib::runner** : [spotifywebapi][out] thread started
[13:19:08.039109] DEBUG: **snips_skill_server_lib::runner** : [spotifywebapi][err] thread started
[13:19:08.179957] INFO : **snips_skill_server_lib::runner** : [HeureLocale][err] Traceback (most recent call last):
[13:19:08.180432] INFO : **snips_skill_server_lib::runner** : [HeureLocale][err] File "./action-HeureLocale", line 4, in <module>
[13:19:08.181356] INFO : **snips_skill_server_lib::runner** : [HeureLocale][err] import ConfigParser
[13:19:08.181844] INFO : **snips_skill_server_lib::runner** : [HeureLocale][err] ImportError: No module named 'ConfigParser'
[13:19:08.208890] DEBUG: **snips_skill_server_lib::runner** : [HeureLocale][out] thread stopped
[13:19:08.208890] DEBUG: **snips_skill_server_lib::runner** : [HeureLocale][err] thread stopped
[13:19:08.239212] WARN : **snips_skill_server_lib::handler::nosandbox** : child HeureLocale has stopped with status `exit code: 1`
[13:19:08.239359] ERROR: **snips_skill_server_lib::runner** : action HeureLocale failed 3 times in the last 10 seconds, disabling it
[13:19:08.647857] INFO : **snips_skill_server_lib::runner** : [spotifywebapi][out] Get the cached token: OK
[13:19:08.647971] INFO : **snips_skill_server_lib::runner** : [spotifywebapi][out] [Error] No cached token find ! Gen the token with:
[13:19:08.648015] INFO : **snips_skill_server_lib::runner** : [spotifywebapi][out] python token-generator.py
[13:19:08.698474] DEBUG: **snips_skill_server_lib::runner** : [spotifywebapi][err] thread stopped
[13:19:08.698658] DEBUG: **snips_skill_server_lib::runner** : [spotifywebapi][out] thread stopped
[13:19:08.740311] WARN : **snips_skill_server_lib::handler::nosandbox** : child spotifywebapi has stopped with status `exit code: 3`
[13:19:08.740438] INFO : **snips_skill_server_lib::runner** : restarting action spotifywebapi (restart_fails: 1)
[13:19:08.742438] DEBUG: **snips_skill_server_lib::runner** : [spotifywebapi][err] thread started
[13:19:08.742419] DEBUG: **snips_skill_server_lib::runner** : [spotifywebapi][out] thread started
[13:19:09.331924] INFO : **snips_skill_server_lib::runner** : [spotifywebapi][out] Get the cached token: OK
[13:19:09.332051] INFO : **snips_skill_server_lib::runner** : [spotifywebapi][out] [Error] No cached token find ! Gen the token with:
[13:19:09.332114] INFO : **snips_skill_server_lib::runner** : [spotifywebapi][out] python token-generator.py
[13:19:09.388314] DEBUG: **snips_skill_server_lib::runner** : [spotifywebapi][out] thread stopped
[13:19:09.388314] DEBUG: **snips_skill_server_lib::runner** : [spotifywebapi][err] thread stopped
[13:19:09.393797] WARN : **snips_skill_server_lib::handler::nosandbox** : child spotifywebapi has stopped with status `exit code: 3`
[13:19:09.393915] INFO : **snips_skill_server_lib::runner** : restarting action spotifywebapi (restart_fails: 2)
[13:19:09.395942] DEBUG: **snips_skill_server_lib::runner** : [spotifywebapi][out] thread started
[13:19:09.395990] DEBUG: **snips_skill_server_lib::runner** : [spotifywebapi][err] thread started
[13:19:09.982295] INFO : **snips_skill_server_lib::runner** : [spotifywebapi][out] Get the cached token: OK
[13:19:09.982409] INFO : **snips_skill_server_lib::runner** : [spotifywebapi][out] [Error] No cached token find ! Gen the token with:
[13:19:09.982685] INFO : **snips_skill_server_lib::runner** : [spotifywebapi][out] python token-generator.py
[13:19:10.033506] DEBUG: **snips_skill_server_lib::runner** : [spotifywebapi][out] thread stopped
[13:19:10.033507] DEBUG: **snips_skill_server_lib::runner** : [spotifywebapi][err] thread stopped
[13:19:10.047134] WARN : **snips_skill_server_lib::handler::nosandbox** : child spotifywebapi has stopped with status `exit code: 3`
[13:19:10.047241] ERROR: **snips_skill_server_lib::runner** : action spotifywebapi failed 3 times in the last 10 seconds, disabling it
[13:19:17.120590] INFO : **snips_skill_server_lib::runner** : [led_animation_1.6][err] [Error] Can't open /dev/spidev0.0 (try 'sudo')[Error] Failed to open SPI! Retry [2] in 10 seconds.
  • My Snips Server is already installed

POUR INFO : Par contre Snips marche bien avec Jeedom. L’ordre est compris, l’action executée et le TTS envoyé.

#13

Hello @eliottinthesky,

The snips-skill-server execute your action code found in this repository.

[13:19:07.100998] DEBUG: **snips_common_cli::cli** : conf lookup: snips-skill-server.skill_dir -> Ok(None)
[13:19:07.101270] DEBUG: **snips_common_cli::cli** : conf lookup: snips-common.skill_dir -> Ok(None)
[13:19:07.101343] DEBUG: **snips_common_cli::cli** : conf lookup: snips-skill-server.skills_root_dir -> Ok(None)
[13:19:07.101406] DEBUG: **snips_common_cli::cli** : conf lookup: snips-common.skills_root_dir -> Ok(None)
[13:19:07.101936] INFO : **snips_skill_server_lib::runner** : searching dir for actions: /var/lib/snips/skills/snips-skill-respeaker
[13:19:07.102489] INFO : **snips_skill_server_lib::runner** : found action "/var/lib/snips/skills/snips-skill-respeaker/action-led_animation_1.6.3"
[13:19:07.102656] INFO : **snips_skill_server_lib::runner** : searching dir for actions: /var/lib/snips/skills/Quicestqui
[13:19:07.102950] INFO : **snips_skill_server_lib::runner** : searching dir for actions: /var/lib/snips/skills/snips-HeureLocale
[13:19:07.103274] INFO : **snips_skill_server_lib::runner** : found action "/var/lib/snips/skills/snips-HeureLocale/action-HeureLocale"
[13:19:07.103428] INFO : **snips_skill_server_lib::runner** : searching dir for actions: /var/lib/snips/skills/snips-app-say-it-again
[13:19:07.103910] INFO : **snips_skill_server_lib::runner** : found action "/var/lib/snips/skills/snips-app-say-it-again/action-say-it-again.py"
[13:19:07.104046] INFO : **snips_skill_server_lib::runner** : searching dir for actions: /var/lib/snips/skills/snips-skill-owm
[13:19:07.104466] INFO : **snips_skill_server_lib::runner** : found action "/var/lib/snips/skills/snips-skill-owm/action-owm.py"
[13:19:07.104616] INFO : **snips_skill_server_lib::runner** : searching dir for actions: /var/lib/snips/skills/.cache
[13:19:07.104801] ERROR: **snips_skill_server_lib::runner** : Error: GlobError { path: "/var/lib/snips/skills/.cache", error: Os { code: 13, kind: PermissionDenied, message: "Permission denied" } }
[13:19:07.104897] INFO : **snips_skill_server_lib::runner** : searching dir for actions: /var/lib/snips/skills/snips-skill-spotifywebapi
[13:19:07.105550] INFO : **snips_skill_server_lib::runner** : found action "/var/lib/snips/skills/snips-skill-spotifywebapi/action-spotifywebapi.py"

[POST EDIT] The command I gave you got a typo (user _snips instead of _snips-skills), the correct one is `sudo -u _snips-skills snips-skill-server -vvv’

Consider the following if you still have the same errors.


Now, if you look at the logs, there is some errors:

[13:19:07.120488] INFO : **snips_skill_server_lib::runner** : [led_animation_1.6][err] [Error] Can't open /dev/spidev0.0 (try 'sudo')[Error] Failed to open SPI! Retry [1] in 10 seconds.

Means that the user _snips-skills cannot use /dev/spidev0.0

Read first this documentation

Then try to quick fix with this command

sudo usermod -a -G spi,gpio,audio _snips-skills

The other errors are the traceback from your python scripts.

[13:19:07.923921] INFO : **snips_skill_server_lib::runner** : [HeureLocale][err] Traceback (most recent call last):
[13:19:07.924123] INFO : **snips_skill_server_lib::runner** : [HeureLocale][err] File "./action-HeureLocale", line 4, in <module>
[13:19:07.924809] INFO : **snips_skill_server_lib::runner** : [HeureLocale][err] import ConfigParser
[13:19:07.924968] INFO : **snips_skill_server_lib::runner** : [HeureLocale][err] ImportError: No module named 'ConfigParser'

That mean that some libraries are missing in the virtual env that MUST be set on those skill folders.

to do so execute the setup.sh script in each folder

Your env could be broken, you can quickly sanitize your OS with the following commands

cd /tmp
virtualenv myenv
source myenv/bin/activate
pip install hermes-python
python -c "import hermes_python"
deactivate

No errors should be raised.

I’m no expert with Jeedom, but I suppose it can catch the intents published on MQTT.

Your issue seems to be linked to your python environment.

For the records (and to improve the doc), which documentation and tools did you use to install snips? Are you using SAM?

#14

Unfortunatly the issue is the same :frowning:

I run all the commands you gave me without any error but Snips don’t want to make action again…

A follow the Snips documentation with Sam.

> **pi@SnipsMaster** : **~ $** sudo -u _snips-skills snips-skill-server -vvv
> [19:03:57.334991] DEBUG: **snips_common_cli::cli** : conf lookup: snips-skill-server.skill_dir -> Ok(None)
> [19:03:57.335316] DEBUG: **snips_common_cli::cli** : conf lookup: snips-common.skill_dir -> Ok(None)
> [19:03:57.335392] DEBUG: **snips_common_cli::cli** : conf lookup: snips-skill-server.skills_root_dir -> Ok(None)
> [19:03:57.335475] DEBUG: **snips_common_cli::cli** : conf lookup: snips-common.skills_root_dir -> Ok(None)
> [19:03:57.335849] INFO : **snips_skill_server_lib::runner** : searching dir for actions: /var/lib/snips/skills/snips-skill-respeaker
> [19:03:57.336318] INFO : **snips_skill_server_lib::runner** : found action "/var/lib/snips/skills/snips-skill-respeaker/action-led_animation_1.6.3"
> [19:03:57.336442] INFO : **snips_skill_server_lib::runner** : searching dir for actions: /var/lib/snips/skills/Quicestqui
> [19:03:57.336666] INFO : **snips_skill_server_lib::runner** : searching dir for actions: /var/lib/snips/skills/snips-HeureLocale
> [19:03:57.337100] INFO : **snips_skill_server_lib::runner** : found action "/var/lib/snips/skills/snips-HeureLocale/action-HeureLocale"
> [19:03:57.337221] INFO : **snips_skill_server_lib::runner** : searching dir for actions: /var/lib/snips/skills/snips-app-say-it-again
> [19:03:57.337495] INFO : **snips_skill_server_lib::runner** : found action "/var/lib/snips/skills/snips-app-say-it-again/action-say-it-again.py"
> [19:03:57.337601] INFO : **snips_skill_server_lib::runner** : searching dir for actions: /var/lib/snips/skills/snips-skill-owm
> [19:03:57.337923] INFO : **snips_skill_server_lib::runner** : found action "/var/lib/snips/skills/snips-skill-owm/action-owm.py"
> [19:03:57.338017] INFO : **snips_skill_server_lib::runner** : searching dir for actions: /var/lib/snips/skills/.cache
> [19:03:57.338190] INFO : **snips_skill_server_lib::runner** : searching dir for actions: /var/lib/snips/skills/snips-skill-spotifywebapi
> [19:03:57.338475] INFO : **snips_skill_server_lib::runner** : found action "/var/lib/snips/skills/snips-skill-spotifywebapi/action-spotifywebapi.py"
> [19:03:57.340402] DEBUG: **snips_skill_server_lib::runner** : [led_animation_1.6][out] thread started
> [19:03:57.341050] DEBUG: **snips_skill_server_lib::runner** : [led_animation_1.6][err] thread started
> [19:03:57.342966] DEBUG: **snips_skill_server_lib::runner** : [HeureLocale][err] thread started
> [19:03:57.346860] DEBUG: **snips_skill_server_lib::runner** : [say-it-again][err] thread started
> [19:03:57.349639] DEBUG: **snips_skill_server_lib::runner** : [owm][out] thread started
> [19:03:57.352982] DEBUG: **snips_skill_server_lib::runner** : [say-it-again][out] thread started
> [19:03:57.355033] DEBUG: **snips_skill_server_lib::runner** : [spotifywebapi][out] thread started
> [19:03:57.355531] DEBUG: **snips_skill_server_lib::runner** : [spotifywebapi][err] thread started
> [19:03:57.356776] DEBUG: **snips_skill_server_lib::runner** : [owm][err] thread started
> [19:03:57.363199] DEBUG: **snips_skill_server_lib::runner** : [HeureLocale][out] thread started
> [19:03:57.665352] INFO : **snips_skill_server_lib::runner** : [HeureLocale][err] Traceback (most recent call last):
> [19:03:57.665941] INFO : **snips_skill_server_lib::runner** : [HeureLocale][err] File "./action-HeureLocale", line 4, in <module>
> [19:03:57.667027] INFO : **snips_skill_server_lib::runner** : [HeureLocale][err] import ConfigParser
> [19:03:57.667775] INFO : **snips_skill_server_lib::runner** : [HeureLocale][err] ImportError: No module named 'ConfigParser'
> [19:03:57.707850] DEBUG: **snips_skill_server_lib::runner** : [HeureLocale][err] thread stopped
> [19:03:57.708366] DEBUG: **snips_skill_server_lib::runner** : [HeureLocale][out] thread stopped
> [19:03:57.753854] WARN : **snips_skill_server_lib::handler::nosandbox** : child HeureLocale has stopped with status `exit code: 1`
> [19:03:57.754005] INFO : **snips_skill_server_lib::runner** : restarting action HeureLocale (restart_fails: 0)
> [19:03:57.759487] DEBUG: **snips_skill_server_lib::runner** : [HeureLocale][out] thread started
> [19:03:57.759746] DEBUG: **snips_skill_server_lib::runner** : [HeureLocale][err] thread started
> [19:03:57.984552] INFO : **snips_skill_server_lib::runner** : [HeureLocale][err] Traceback (most recent call last):
> [19:03:57.984795] INFO : **snips_skill_server_lib::runner** : [HeureLocale][err] File "./action-HeureLocale", line 4, in <module>
> [19:03:57.985989] INFO : **snips_skill_server_lib::runner** : [HeureLocale][err] import ConfigParser
> [19:03:57.986217] INFO : **snips_skill_server_lib::runner** : [HeureLocale][err] ImportError: No module named 'ConfigParser'
> [19:03:58.024114] DEBUG: **snips_skill_server_lib::runner** : [HeureLocale][err] thread stopped
> [19:03:58.024452] DEBUG: **snips_skill_server_lib::runner** : [HeureLocale][out] thread stopped
> [19:03:58.057740] WARN : **snips_skill_server_lib::handler::nosandbox** : child HeureLocale has stopped with status `exit code: 1`
> [19:03:58.057892] INFO : **snips_skill_server_lib::runner** : restarting action HeureLocale (restart_fails: 1)
> [19:03:58.062988] DEBUG: **snips_skill_server_lib::runner** : [HeureLocale][out] thread started
> [19:03:58.067133] DEBUG: **snips_skill_server_lib::runner** : [HeureLocale][err] thread started
> [19:03:58.254989] INFO : **snips_skill_server_lib::runner** : [HeureLocale][err] Traceback (most recent call last):
> [19:03:58.255196] INFO : **snips_skill_server_lib::runner** : [HeureLocale][err] File "./action-HeureLocale", line 4, in <module>
> [19:03:58.255799] INFO : **snips_skill_server_lib::runner** : [HeureLocale][err] import ConfigParser
> [19:03:58.255911] INFO : **snips_skill_server_lib::runner** : [HeureLocale][err] ImportError: No module named 'ConfigParser'
> [19:03:58.288112] DEBUG: **snips_skill_server_lib::runner** : [HeureLocale][out] thread stopped
> [19:03:58.288307] DEBUG: **snips_skill_server_lib::runner** : [HeureLocale][err] thread stopped
> [19:03:58.303314] INFO : **snips_skill_server_lib::runner** : [spotifywebapi][out] Get the cached token: OK
> [19:03:58.303429] INFO : **snips_skill_server_lib::runner** : [spotifywebapi][out] [Error] No cached token find ! Gen the token with:
> [19:03:58.303472] INFO : **snips_skill_server_lib::runner** : [spotifywebapi][out] python token-generator.py
> [19:03:58.311423] WARN : **snips_skill_server_lib::handler::nosandbox** : child HeureLocale has stopped with status `exit code: 1`
> [19:03:58.311566] INFO : **snips_skill_server_lib::runner** : restarting action HeureLocale (restart_fails: 2)
> [19:03:58.314100] DEBUG: **snips_skill_server_lib::runner** : [HeureLocale][err] thread started
> [19:03:58.314524] DEBUG: **snips_skill_server_lib::runner** : [HeureLocale][out] thread started
> [19:03:58.367006] DEBUG: **snips_skill_server_lib::runner** : [spotifywebapi][err] thread stopped
> [19:03:58.367291] DEBUG: **snips_skill_server_lib::runner** : [spotifywebapi][out] thread stopped
> [19:03:58.414236] WARN : **snips_skill_server_lib::handler::nosandbox** : child spotifywebapi has stopped with status `exit code: 3`
> [19:03:58.414394] INFO : **snips_skill_server_lib::runner** : restarting action spotifywebapi (restart_fails: 0)
> [19:03:58.417226] DEBUG: **snips_skill_server_lib::runner** : [spotifywebapi][out] thread started
> [19:03:58.417292] DEBUG: **snips_skill_server_lib::runner** : [spotifywebapi][err] thread started
> [19:03:58.486449] INFO : **snips_skill_server_lib::runner** : [HeureLocale][err] Traceback (most recent call last):
> [19:03:58.486585] INFO : **snips_skill_server_lib::runner** : [HeureLocale][err] File "./action-HeureLocale", line 4, in <module>
> [19:03:58.487180] INFO : **snips_skill_server_lib::runner** : [HeureLocale][err] import ConfigParser
> [19:03:58.487304] INFO : **snips_skill_server_lib::runner** : [HeureLocale][err] ImportError: No module named 'ConfigParser'
> [19:03:58.515534] DEBUG: **snips_skill_server_lib::runner** : [HeureLocale][err] thread stopped
> [19:03:58.515761] DEBUG: **snips_skill_server_lib::runner** : [HeureLocale][out] thread stopped
> [19:03:58.517396] WARN : **snips_skill_server_lib::handler::nosandbox** : child HeureLocale has stopped with status `exit code: 1`
> [19:03:58.517520] ERROR: **snips_skill_server_lib::runner** : action HeureLocale failed 3 times in the last 10 seconds, disabling it
> [19:03:59.009065] INFO : **snips_skill_server_lib::runner** : [spotifywebapi][out] Get the cached token: OK
> [19:03:59.009168] INFO : **snips_skill_server_lib::runner** : [spotifywebapi][out] [Error] No cached token find ! Gen the token with:
> [19:03:59.009200] INFO : **snips_skill_server_lib::runner** : [spotifywebapi][out] python token-generator.py
> [19:03:59.059297] DEBUG: **snips_skill_server_lib::runner** : [spotifywebapi][out] thread stopped
> [19:03:59.059298] DEBUG: **snips_skill_server_lib::runner** : [spotifywebapi][err] thread stopped
> [19:03:59.068530] WARN : **snips_skill_server_lib::handler::nosandbox** : child spotifywebapi has stopped with status `exit code: 3`
> [19:03:59.068622] INFO : **snips_skill_server_lib::runner** : restarting action spotifywebapi (restart_fails: 1)
> [19:03:59.070610] DEBUG: **snips_skill_server_lib::runner** : [spotifywebapi][out] thread started
> [19:03:59.070634] DEBUG: **snips_skill_server_lib::runner** : [spotifywebapi][err] thread started
> [19:03:59.667074] INFO : **snips_skill_server_lib::runner** : [spotifywebapi][out] Get the cached token: OK
> [19:03:59.667404] INFO : **snips_skill_server_lib::runner** : [spotifywebapi][out] [Error] No cached token find ! Gen the token with:
> [19:03:59.667536] INFO : **snips_skill_server_lib::runner** : [spotifywebapi][out] python token-generator.py
> [19:03:59.718657] DEBUG: **snips_skill_server_lib::runner** : [spotifywebapi][err] thread stopped
> [19:03:59.718657] DEBUG: **snips_skill_server_lib::runner** : [spotifywebapi][out] thread stopped
> [19:03:59.721869] WARN : **snips_skill_server_lib::handler::nosandbox** : child spotifywebapi has stopped with status `exit code: 3`
> [19:03:59.721959] INFO : **snips_skill_server_lib::runner** : restarting action spotifywebapi (restart_fails: 2)
> [19:03:59.723962] DEBUG: **snips_skill_server_lib::runner** : [spotifywebapi][err] thread started
> [19:03:59.723954] DEBUG: **snips_skill_server_lib::runner** : [spotifywebapi][out] thread started
> [19:04:00.323275] INFO : **snips_skill_server_lib::runner** : [spotifywebapi][out] Get the cached token: OK
> [19:04:00.323379] INFO : **snips_skill_server_lib::runner** : [spotifywebapi][out] [Error] No cached token find ! Gen the token with:
> [19:04:00.323687] INFO : **snips_skill_server_lib::runner** : [spotifywebapi][out] python token-generator.py
> [19:04:00.375618] DEBUG: **snips_skill_server_lib::runner** : [spotifywebapi][out] thread stopped
> [19:04:00.375618] DEBUG: **snips_skill_server_lib::runner** : [spotifywebapi][err] thread stopped
> [19:04:00.425158] WARN : **snips_skill_server_lib::handler::nosandbox** : child spotifywebapi has stopped with status `exit code: 3`
> [19:04:00.425281] ERROR: **snips_skill_server_lib::runner** : action spotifywebapi failed 3 times in the last 10 seconds, disabling it
> packet_write_wait: Connection to 2a01:cb00:b76:2a00:3822:ca25:4983:4a7f port 22: Broken pipe

Should i erase my rpi for fresh install ? it will be the second time for this issue :frowning:

#15

I see a lot of errors in your logs.

It still seems that your python environment is not set correctly, some modules are missing.

Can you try to run at least one of your action code in the virtualenv created in one your skill such as snips-HeureLocale/action-HeureLocale (by the way it is strange that the .py extension is missing)

#16

Ah… it seem to be a clue…

**pi@SnipsMaster** : **/var/lib/snips/skills/snips-app-say-it-again $** ls
**action-say-it-again.py** LICENSE README.md requirements.txt **setup.sh** **translations** **venv**
**pi@SnipsMaster** : **/var/lib/snips/skills/snips-app-say-it-again $** python action-say-it-again.py
Traceback (most recent call last):
File "action-say-it-again.py", line 14, in <module>
import paho.mqtt.client as mqtt
ImportError: No module named paho.mqtt.client
#17

Did you run setup.sh in the directory of the app?

#18

Could you give me the localisation of the virtual environement ?

#19

And do you run the app in the virtual environment the setup.sh script created?

#20

Yes i ran the setup.sh in each skills