Mycroft does not work in ubuntu 20.04

I have just re-installed Ubuntu 20.04 and installed mycroft and it does not work.

in audio.log:

2020-08-02 16:55:41.324 | INFO     | 19266 | mycroft.messagebus.load_config:load_message_bus_config:33 | Loading message bus configs

2020-08-02 16:55:41.778 | ERROR | 19266 | mycroft.tts.tts:create:527 | The TTS could not be loaded.
Traceback (most recent call last):
File “/home/steven/mycroft-core/mycroft/tts/mimic_tts.py”, line 187, in validate_connection
subprocess.call([BIN, ‘–version’])
File “/usr/lib/python3.8/subprocess.py”, line 340, in call
with Popen(*popenargs, **kwargs) as p:
File “/usr/lib/python3.8/subprocess.py”, line 854, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File “/usr/lib/python3.8/subprocess.py”, line 1583, in _execute_child
and os.path.dirname(executable)
File “/usr/lib/python3.8/posixpath.py”, line 152, in dirname
p = os.fspath§
TypeError: expected str, bytes or os.PathLike object, not NoneType

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/home/steven/mycroft-core/mycroft/tts/tts.py”, line 517, in create
tts.validator.validate()
File “/home/steven/mycroft-core/mycroft/tts/tts.py”, line 435, in validate
self.validate_connection()
File “/home/steven/mycroft-core/mycroft/tts/mimic_tts.py”, line 189, in validate_connection
LOG.info("Failed to find mimic at: " + BIN)
TypeError: can only concatenate str (not “NoneType”) to str
Traceback (most recent call last):
File “/home/steven/mycroft-core/mycroft/tts/mimic_tts.py”, line 187, in validate_connection
subprocess.call([BIN, ‘–version’])
File “/usr/lib/python3.8/subprocess.py”, line 340, in call
with Popen(*popenargs, **kwargs) as p:
File “/usr/lib/python3.8/subprocess.py”, line 854, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File “/usr/lib/python3.8/subprocess.py”, line 1583, in _execute_child
and os.path.dirname(executable)
File “/usr/lib/python3.8/posixpath.py”, line 152, in dirname
p = os.fspath§
TypeError: expected str, bytes or os.PathLike object, not NoneType

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “/usr/lib/python3.8/runpy.py”, line 193, in _run_module_as_main
return _run_code(code, main_globals, None,
File “/usr/lib/python3.8/runpy.py”, line 86, in _run_code
exec(code, run_globals)
File “/home/steven/mycroft-core/mycroft/audio/main.py”, line 49, in
main()
File “/home/steven/mycroft-core/mycroft/audio/main.py”, line 36, in main
speech.init(bus)
File “/home/steven/mycroft-core/mycroft/audio/speech.py”, line 182, in init
tts = TTSFactory.create()
File “/home/steven/mycroft-core/mycroft/tts/tts.py”, line 517, in create
tts.validator.validate()
File “/home/steven/mycroft-core/mycroft/tts/tts.py”, line 435, in validate
self.validate_connection()
File “/home/steven/mycroft-core/mycroft/tts/mimic_tts.py”, line 189, in validate_connection
LOG.info("Failed to find mimic at: " + BIN)
TypeError: can only concatenate str (not “NoneType”) to str

In voice.log:

2020-08-02 16:55:39.403 | INFO     | 19269 | mycroft.messagebus.load_config:load_message_bus_config:33 | Loading message bus configs

ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
2020-08-02 16:55:41.054 | INFO | 19269 | mycroft.client.speech.listener:create_wake_word_recognizer:323 | Creating wake word engine
2020-08-02 16:55:41.055 | INFO | 19269 | mycroft.client.speech.listener:create_wake_word_recognizer:346 | Using hotword entry for hey mycroft
2020-08-02 16:55:41.057 | INFO | 19269 | mycroft.client.speech.hotword_factory:load_module:386 | Loading “hey mycroft” wake word via precise
2020-08-02 16:55:43.688 | INFO | 19269 | mycroft.client.speech.listener:create_wakeup_recognizer:360 | creating stand up word engine
2020-08-02 16:55:43.689 | INFO | 19269 | mycroft.client.speech.hotword_factory:load_module:386 | Loading “wake up” wake word via pocketsphinx
2020-08-02 16:55:43.888 | INFO | 19269 | mycroft.messagebus.client.client:on_open:67 | Connected
Traceback (most recent call last):
File “precise/scripts/engine.py”, line 32, in
File “/home/tesla/mycroft-precise/.venv/lib/python3.8/site-packages/PyInstaller/loader/pyimod03_importers.py”, line 623, in exec_module
File “precise/network_runner.py”, line 17, in
File “/home/tesla/mycroft-precise/.venv/lib/python3.8/site-packages/PyInstaller/loader/pyimod03_importers.py”, line 623, in exec_module
File “numpy/init.py”, line 151, in
File “/home/tesla/mycroft-precise/.venv/lib/python3.8/site-packages/PyInstaller/loader/pyimod03_importers.py”, line 623, in exec_module
File “numpy/ctypeslib.py”, line 369, in
File “numpy/ctypeslib.py”, line 358, in _get_typecodes
File “numpy/ctypeslib.py”, line 358, in
ModuleNotFoundError: No module named ‘numpy.core._dtype_ctypes’
[19502] Failed to execute script engine
Exception in thread Thread-17:
Traceback (most recent call last):
File “/usr/lib/python3.8/threading.py”, line 932, in _bootstrap_inner
self.run()
File “/usr/lib/python3.8/threading.py”, line 870, in run
self._target(*self._args, **self._kwargs)
File “/home/steven/mycroft-core/.venv/lib/python3.8/site-packages/precise_runner/runner.py”, line 197, in _handle_predictions
prob = self.engine.get_prediction(chunk)
File “/home/steven/mycroft-core/.venv/lib/python3.8/site-packages/precise_runner/runner.py”, line 64, in get_prediction
self.proc.stdin.flush()
BrokenPipeError: [Errno 32] Broken pipe

Have you made any config changes?
Which voice do you have selected?
What have you tried to do to fix it so far? What was the result of that?

fresh install of everything, and there is nothing I can do, it just does not work.

Thanks to ken-mycroft, now I know how make it works!

Hi callofcthulhu, what was a cause and how did you fix it? I am going to upgrade my Ubuntu 19.10 to 20.04 this week as 19.10 is no longer support updates. Thank You

Hi,

The reason is that Ubunt 20.04 has python 3.8 by default and it does not work with mycroft.
So:
wget https://www.python.org/ftp/python/3.7.5/Python-3.7.5.tgz
tar xf Python-3.7.5.tgz
cd Python-3.7.5/
./configure --enable-optimizations --enable-shared
sudo make install

1 Like

Can I clarify, are you using a manual install of Precise rather than the binary that is downloaded by default?

Using the standard installation instructions Mycroft does work on Ubuntu 20.04.

1 Like

When I tried 11d ago as default installation did not work, but now it does.
So, my question is, does mycroft works with python 3.8?

The only actual issue that I can recall is the lack of an appropriate version of TensorFlow for Precise (issue #133).

Currently we only test in Python 3.5-3.7, so officially we don’t support 3.8 yet, but we do need to add it given it’s general availability now.

Yes, but Ubuntu 20.04 uses 3.8 and it seems that now mycroft works with that.

Yes, it works because in a default installation Precise gets downloaded pre-compiled with TF builtin and wouldn’t hit the issue above. So whilst we don’t officially support 3.8 Mycroft does run fine on Ubuntu 20.04 as you said.

Now, I finally get it, the issue is with precise, so if you want to source install it you need python 3.7 right?

If you want to source install precise yes.

Using the “git install” of Mycroft-core uses the packaged version of Precise.
(just wanted to be clear as I could see people calling this a source install)

1 Like