[Manual install] Problem with loading modules and their Python dependencies

325 views
Skip to first unread message

fps

unread,
Mar 29, 2016, 5:19:06 PM3/29/16
to Jasper Support Forum
After fixing all the missing packages, fixing the experimental bug that causes sphinx to miss dependencies (http://chrismeiercs.com/blog/2016/02/27/installing-jasper-on-raspberry-pi-b-plus/) and fixing all kinds of bugs with internet help, I stumbled on a bug I can't seem to find a proper solution for. Somehow, it seems that (almost) none of the modules load, due to some kind of missing dependency. On the internet there are no guides or blogs about this (as far as I could find), which I find quite strange. 

I have a Raspberry Pi B (2 USB slots, ethernet, mic and aux), with a tested, working (on the RbPi) microphone as well as audio output. It all runs on Raspbian Jessie distribution (dowloaded around 25th of March). 


Here is my output:

$USER@$SERVER: ~/jasper$ sudo ./jasper.py

*******************************************************

*             JASPER - THE TALKING COMPUTER           *

* (c) 2015 Shubhro Saha, Charlie Marsh & Jan Holthuis *

*******************************************************

WARNING:client.brain:Skipped module 'Birthday' due to an error.

Traceback (most recent call last):

  File "/home/$USER/jasper/client/brain.py", line 43, in get_modules

    mod = loader.load_module(name)

  File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module

    mod = imp.load_module(fullname, self.file, self.filename, self.etc)

  File "/home/$USER/jasper/client/modules/Birthday.py", line 4, in <module>

    import facebook

ImportError: No module named facebook

WARNING:client.brain:Skipped module 'HN' due to an error.

Traceback (most recent call last):

  File "/home/$USER/jasper/client/brain.py", line 43, in get_modules

    mod = loader.load_module(name)

  File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module

    mod = imp.load_module(fullname, self.file, self.filename, self.etc)

  File "/home/$USER/jasper/client/modules/HN.py", line 7, in <module>

    from semantic.numbers import NumberService

ImportError: No module named semantic.numbers

WARNING:client.brain:Skipped module 'MPDControl' due to an error.

Traceback (most recent call last):

  File "/home/fps/jasper/client/brain.py", line 43, in get_modules

    mod = loader.load_module(name)

  File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module

    mod = imp.load_module(fullname, self.file, self.filename, self.etc)

  File "/home/$USER/jasper/client/modules/MPDControl.py", line 5, in <module>

    import mpd

ImportError: No module named mpd

WARNING:client.brain:Skipped module 'News' due to an error.

Traceback (most recent call last):

  File "/home/fps/jasper/client/brain.py", line 43, in get_modules

    mod = loader.load_module(name)

  File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module

    mod = imp.load_module(fullname, self.file, self.filename, self.etc)

  File "/home/$USER/jasper/client/modules/News.py", line 5, in <module>

    from semantic.numbers import NumberService

ImportError: No module named semantic.numbers

WARNING:client.brain:Skipped module 'Notifications' due to an error.

Traceback (most recent call last):

  File "/home/fps/jasper/client/brain.py", line 43, in get_modules

    mod = loader.load_module(name)

  File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module

    mod = imp.load_module(fullname, self.file, self.filename, self.etc)

  File "/home/fps/jasper/client/modules/Notifications.py", line 3, in <module>

    import facebook

ImportError: No module named facebook

WARNING:client.brain:Skipped module 'Time' due to an error.

Traceback (most recent call last):

  File "/home/fps/jasper/client/brain.py", line 43, in get_modules

    mod = loader.load_module(name)

  File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module

    mod = imp.load_module(fullname, self.file, self.filename, self.etc)

  File "/home/$USER/jasper/client/modules/Time.py", line 5, in <module>

    from semantic.dates import DateService

ImportError: No module named semantic.dates

WARNING:client.brain:Skipped module 'Weather' due to an error.

Traceback (most recent call last):

  File "/home/fps/jasper/client/brain.py", line 43, in get_modules

    mod = loader.load_module(name)

  File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module

    mod = imp.load_module(fullname, self.file, self.filename, self.etc)

  File "/home/fps/jasper/client/modules/Weather.py", line 10, in <module>

    from semantic.dates import DateService

ImportError: No module named semantic.dates

ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.front.0:CARD=0'

ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory

ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory

ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM front

ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear

ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe

ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side

ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'

ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory

ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory

ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround21

ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'

ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory

ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory

ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround21

ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround40.0:CARD=0'

ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory

ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory

ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround40

ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'

ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory

ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory

ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround41

ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'

ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory

ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory

ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround50

ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'

ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory

ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory

ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround51

ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround71.0:CARD=0'

ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory

ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory

ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround71

ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'

ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory

ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory

ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM iec958

ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'

ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory

ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory

ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM spdif

ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'

ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory

ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory

ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM spdif

ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi

ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi

ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem

ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem

ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline

ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline

Cannot connect to server socket err = No such file or directory

Cannot connect to server request channel

jack server is not running or cannot be started

WARNING:client.brain:Skipped module 'Birthday' due to an error.

Traceback (most recent call last):

  File "/home/fps/jasper/client/brain.py", line 43, in get_modules

    mod = loader.load_module(name)

  File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module

    mod = imp.load_module(fullname, self.file, self.filename, self.etc)

  File "/home/$USER/jasper/client/modules/Birthday.py", line 4, in <module>

    import facebook

ImportError: No module named facebook

WARNING:client.brain:Skipped module 'HN' due to an error.

Traceback (most recent call last):

  File "/home/fps/jasper/client/brain.py", line 43, in get_modules

    mod = loader.load_module(name)

  File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module

    mod = imp.load_module(fullname, self.file, self.filename, self.etc)

  File "/home/$USER/jasper/client/modules/HN.py", line 7, in <module>

    from semantic.numbers import NumberService

ImportError: No module named semantic.numbers

WARNING:client.brain:Skipped module 'MPDControl' due to an error.

Traceback (most recent call last):

  File "/home/fps/jasper/client/brain.py", line 43, in get_modules

    mod = loader.load_module(name)

  File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module

    mod = imp.load_module(fullname, self.file, self.filename, self.etc)

  File "/home/$USER/jasper/client/modules/MPDControl.py", line 5, in <module>

    import mpd

ImportError: No module named mpd

WARNING:client.brain:Skipped module 'News' due to an error.

Traceback (most recent call last):

  File "/home/fps/jasper/client/brain.py", line 43, in get_modules

    mod = loader.load_module(name)

  File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module

    mod = imp.load_module(fullname, self.file, self.filename, self.etc)

  File "/home/$USER/jasper/client/modules/News.py", line 5, in <module>

    from semantic.numbers import NumberService

ImportError: No module named semantic.numbers

WARNING:client.brain:Skipped module 'Notifications' due to an error.

Traceback (most recent call last):

  File "/home/fps/jasper/client/brain.py", line 43, in get_modules

    mod = loader.load_module(name)

  File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module

    mod = imp.load_module(fullname, self.file, self.filename, self.etc)

  File "/home/fps/jasper/client/modules/Notifications.py", line 3, in <module>

    import facebook

ImportError: No module named facebook

WARNING:client.brain:Skipped module 'Time' due to an error.

Traceback (most recent call last):

  File "/home/fps/jasper/client/brain.py", line 43, in get_modules

    mod = loader.load_module(name)

  File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module

    mod = imp.load_module(fullname, self.file, self.filename, self.etc)

  File "/home/$USER/jasper/client/modules/Time.py", line 5, in <module>

    from semantic.dates import DateService

ImportError: No module named semantic.dates

WARNING:client.brain:Skipped module 'Weather' due to an error.

Traceback (most recent call last):

  File "/home/fps/jasper/client/brain.py", line 43, in get_modules

    mod = loader.load_module(name)

  File "/usr/lib/python2.7/pkgutil.py", line 246, in load_module

    mod = imp.load_module(fullname, self.file, self.filename, self.etc)

  File "/home/fps/jasper/client/modules/Weather.py", line 10, in <module>

    from semantic.dates import DateService

ImportError: No module named semantic.dates

Expression 'paInvalidSampleRate' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2048

Expression 'PaAlsaStreamComponent_InitialConfigure( &self->capture, inParams, self->primeBuffers, hwParamsCapture, &realSr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2719

Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2843

Traceback (most recent call last):

  File "./jasper.py", line 148, in <module>

    app.run()

  File "./jasper.py", line 118, in run

    conversation.handleForever()

  File "/home/fps/jasper/client/conversation.py", line 31, in handleForever

    threshold, transcribed = self.mic.passiveListen(self.persona)

  File "/home/$USER/jasper/client/mic.py", line 110, in passiveListen

    frames_per_buffer=CHUNK)

  File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 747, in open

    stream = Stream(self, *args, **kwargs)

  File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 442, in __init__

    self._stream = pa.open(**arguments)

IOError: [Errno Invalid sample rate] -9997



Could someone help me? What did I do wrong? Or should I just manually install all modules that now cause an ImportError? 

fps

unread,
Apr 3, 2016, 12:12:50 PM4/3/16
to Jasper Support Forum
sudo pip install --upgrade setuptools
sudo pip install -r jasper/client/requirements.txt

Fixed it using the above code...

Op dinsdag 29 maart 2016 23:19:06 UTC+2 schreef fps:
Reply all
Reply to author
Forward
0 new messages