Сложность запуска python скрипта с использованием systemd - PullRequest
0 голосов
/ 29 мая 2020
• 1000 *

/home/jetson/Downloads/jetson/env/bin/python /home/jetson/Downloads/jetson/main.py

Я пытаюсь запустить скрипт автоматически при запуске ОС с помощью systemd. Скрипт запускается нормально, но не обнаруживает, что я говорю.

Вот мой .service файл:

[Unit]
Description=Camera vision service


[Service]
Type=simple
WorkingDirectory=/home/jetson/Downloads/jetson

ExecStart=/home/jetson/Downloads/jetson/env/bin/python /home/jetson/Downloads/jetson/main.py

[Install]
WantedBy=default.target

Вывод журнала из journalctl:

jetson@jetson:~/Downloads/jetson$ journalctl --user-unit cameravision -f
-- Logs begin at Fri 2020-05-29 12:05:38 EDT. --
May 29 12:09:32 jetson python[7742]: ctor.FaceDetector 1
May 29 12:09:32 jetson python[7742]:  * Serving Flask app "voice.text_to_speech_controller" (lazy loading)
May 29 12:09:32 jetson python[7742]:  * Environment: production
May 29 12:09:32 jetson python[7742]:    WARNING: This is a development server. Do not use it in a production deployment.
May 29 12:09:32 jetson python[7742]:    Use a production WSGI server instead.
May 29 12:09:32 jetson python[7742]:  * Debug mode: off
May 29 12:09:32 jetson python[7742]:  * Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
May 29 12:09:47 jetson python[7742]: Deserialize required 8575921 microseconds.
May 29 12:09:47 jetson python[7742]: Deserialize required 15143 microseconds.
May 29 12:09:47 jetson python[7742]: Deserialize required 22510 microseconds.
May 29 12:10:32 jetson python[7742]: ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.tegra-hda.pcm.front.0:CARD=0'
May 29 12:10:32 jetson python[7742]: ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
May 29 12:10:32 jetson python[7742]: ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
May 29 12:10:32 jetson python[7742]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM front
May 29 12:10:32 jetson python[7742]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
May 29 12:10:32 jetson python[7742]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
May 29 12:10:32 jetson python[7742]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
May 29 12:10:32 jetson python[7742]: ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.tegra-hda.pcm.surround51.0:CARD=0'
May 29 12:10:32 jetson python[7742]: ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
May 29 12:10:32 jetson python[7742]: ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
May 29 12:10:32 jetson python[7742]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround21
May 29 12:10:32 jetson python[7742]: ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.tegra-hda.pcm.surround51.0:CARD=0'
May 29 12:10:32 jetson python[7742]: ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
May 29 12:10:32 jetson python[7742]: ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
May 29 12:10:32 jetson python[7742]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround21
May 29 12:10:32 jetson python[7742]: ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.tegra-hda.pcm.surround40.0:CARD=0'
May 29 12:10:32 jetson python[7742]: ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
May 29 12:10:32 jetson python[7742]: ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
May 29 12:10:32 jetson python[7742]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround40
May 29 12:10:32 jetson python[7742]: ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.tegra-hda.pcm.surround51.0:CARD=0'
May 29 12:10:32 jetson python[7742]: ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
May 29 12:10:32 jetson python[7742]: ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
May 29 12:10:32 jetson python[7742]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround41
May 29 12:10:32 jetson python[7742]: ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.tegra-hda.pcm.surround51.0:CARD=0'
May 29 12:10:32 jetson python[7742]: ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
May 29 12:10:32 jetson python[7742]: ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
May 29 12:10:32 jetson python[7742]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround50
May 29 12:10:32 jetson python[7742]: ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.tegra-hda.pcm.surround51.0:CARD=0'
May 29 12:10:32 jetson python[7742]: ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
May 29 12:10:32 jetson python[7742]: ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
May 29 12:10:32 jetson python[7742]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround51
May 29 12:10:32 jetson python[7742]: ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.tegra-hda.pcm.surround71.0:CARD=0'
May 29 12:10:32 jetson python[7742]: ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
May 29 12:10:32 jetson python[7742]: ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
May 29 12:10:32 jetson python[7742]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround71
May 29 12:10:32 jetson python[7742]: ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.tegra-hda.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
May 29 12:10:32 jetson python[7742]: ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
May 29 12:10:32 jetson python[7742]: ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
May 29 12:10:32 jetson python[7742]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM iec958
May 29 12:10:32 jetson python[7742]: ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.tegra-hda.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
May 29 12:10:32 jetson python[7742]: ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
May 29 12:10:32 jetson python[7742]: ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
May 29 12:10:32 jetson python[7742]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM spdif
May 29 12:10:32 jetson python[7742]: ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.tegra-hda.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
May 29 12:10:32 jetson python[7742]: ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
May 29 12:10:32 jetson python[7742]: ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
May 29 12:10:32 jetson python[7742]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM spdif
May 29 12:10:32 jetson python[7742]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
May 29 12:10:32 jetson python[7742]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
May 29 12:10:32 jetson python[7742]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
May 29 12:10:32 jetson python[7742]: ALSA lib pcm_dmix.c:990:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
May 29 12:10:32 jetson python[7742]: ALSA lib pcm_hw.c:1713:(_snd_pcm_hw_open) Invalid value for card
May 29 12:10:32 jetson python[7742]: ALSA lib pcm_hw.c:1713:(_snd_pcm_hw_open) Invalid value for card
May 29 12:10:32 jetson python[7742]: ALSA lib pcm_hw.c:1713:(_snd_pcm_hw_open) Invalid value for card
May 29 12:10:32 jetson python[7742]: ALSA lib pcm_hw.c:1713:(_snd_pcm_hw_open) Invalid value for card
May 29 12:10:32 jetson python[7742]: ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave
May 29 12:10:36 jetson python[7742]: ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.tegra-hda.pcm.front.0:CARD=0'
May 29 12:10:36 jetson python[7742]: ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
May 29 12:10:36 jetson python[7742]: ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
May 29 12:10:36 jetson python[7742]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM front
May 29 12:10:36 jetson python[7742]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
May 29 12:10:36 jetson python[7742]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
May 29 12:10:36 jetson python[7742]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
May 29 12:10:36 jetson python[7742]: ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.tegra-hda.pcm.surround51.0:CARD=0'
May 29 12:10:36 jetson python[7742]: ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
May 29 12:10:36 jetson python[7742]: ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
May 29 12:10:36 jetson python[7742]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround21
May 29 12:10:36 jetson python[7742]: ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.tegra-hda.pcm.surround51.0:CARD=0'
May 29 12:10:36 jetson python[7742]: ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
May 29 12:10:36 jetson python[7742]: ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
May 29 12:10:36 jetson python[7742]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround21
May 29 12:10:36 jetson python[7742]: ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.tegra-hda.pcm.surround40.0:CARD=0'
May 29 12:10:36 jetson python[7742]: ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
May 29 12:10:36 jetson python[7742]: ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
May 29 12:10:36 jetson python[7742]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround40
May 29 12:10:36 jetson python[7742]: ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.tegra-hda.pcm.surround51.0:CARD=0'
May 29 12:10:36 jetson python[7742]: ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
May 29 12:10:36 jetson python[7742]: ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
May 29 12:10:36 jetson python[7742]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround41
May 29 12:10:36 jetson python[7742]: ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.tegra-hda.pcm.surround51.0:CARD=0'
May 29 12:10:36 jetson python[7742]: ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
May 29 12:10:36 jetson python[7742]: ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
May 29 12:10:36 jetson python[7742]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround50
May 29 12:10:36 jetson python[7742]: ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.tegra-hda.pcm.surround51.0:CARD=0'
May 29 12:10:36 jetson python[7742]: ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
May 29 12:10:36 jetson python[7742]: ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
May 29 12:10:36 jetson python[7742]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround51
May 29 12:10:36 jetson python[7742]: ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.tegra-hda.pcm.surround71.0:CARD=0'
May 29 12:10:36 jetson python[7742]: ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
May 29 12:10:36 jetson python[7742]: ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
May 29 12:10:36 jetson python[7742]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM surround71
May 29 12:10:36 jetson python[7742]: ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.tegra-hda.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
May 29 12:10:36 jetson python[7742]: ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
May 29 12:10:36 jetson python[7742]: ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
May 29 12:10:36 jetson python[7742]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM iec958
May 29 12:10:36 jetson python[7742]: ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.tegra-hda.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
May 29 12:10:36 jetson python[7742]: ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
May 29 12:10:36 jetson python[7742]: ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
May 29 12:10:36 jetson python[7742]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM spdif
May 29 12:10:36 jetson python[7742]: ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition 'cards.tegra-hda.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
May 29 12:10:36 jetson python[7742]: ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
May 29 12:10:36 jetson python[7742]: ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
May 29 12:10:36 jetson python[7742]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM spdif
May 29 12:10:36 jetson python[7742]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
May 29 12:10:36 jetson python[7742]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
May 29 12:10:36 jetson python[7742]: ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
May 29 12:10:36 jetson python[7742]: ALSA lib pcm_dmix.c:990:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
May 29 12:10:36 jetson python[7742]: ALSA lib pcm_hw.c:1713:(_snd_pcm_hw_open) Invalid value for card
May 29 12:10:36 jetson python[7742]: ALSA lib pcm_hw.c:1713:(_snd_pcm_hw_open) Invalid value for card
May 29 12:10:36 jetson python[7742]: ALSA lib pcm_hw.c:1713:(_snd_pcm_hw_open) Invalid value for card
May 29 12:10:36 jetson python[7742]: ALSA lib pcm_hw.c:1713:(_snd_pcm_hw_open) Invalid value for card
May 29 12:10:36 jetson python[7742]: ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave
...