Skip to content
This repository has been archived by the owner on Feb 16, 2021. It is now read-only.

Failed to load skill #6

Open
adocampo opened this issue Aug 18, 2019 · 13 comments
Open

Failed to load skill #6

adocampo opened this issue Aug 18, 2019 · 13 comments
Labels

Comments

@adocampo
Copy link

Hi there,
Just installed the skill under Arch linux. The skill fails to load.

14:20:11.341 - mycroft.skills.core:load_skill:169 - ERROR - Failed to load skill: communications-skill
Traceback (most recent call last):
  File "/home/malevolent/development/mycroft-core/mycroft/skills/core.py", line 131, in load_skill
    imp.PY_SOURCE))
  File "/usr/lib/python3.7/imp.py", line 234, in load_module
    return load_source(name, filename, file)
  File "/usr/lib/python3.7/imp.py", line 171, in load_source
    module = _load(spec)
  File "<frozen importlib._bootstrap>", line 696, in _load
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/opt/mycroft/skills/communications-skill/__init__.py", line 16, in <module>
    import py2p
ModuleNotFoundError: No module named 'py2p'

As the error suggest, I've installed (globally) py2p though pip

sudo pip install  py2p
Collecting py2p
  Downloading https://files.pythonhosted.org/packages/2b/2a/d85c006a08069fb987bf33d2aa0596553ddc5f809ede3980e0089a58ef75/py2p-0.7.878-py2.py3-none-any.whl (51kB)
     |████████████████████████████████| 61kB 1.8MB/s 
Collecting async-promises (from py2p)
  Downloading https://files.pythonhosted.org/packages/6e/86/baf2be0b3b9fe28ba1c1ae30176376ec8f828dbfe812b95d37645fd0a5e7/async_promises-1.1.1.tar.gz
Collecting custom-inherit (from py2p)
  Downloading https://files.pythonhosted.org/packages/0e/ea/9f5050a4f1563c8c196b3526c2057fb7846e638942d59a187b79e33d1c9e/custom_inherit-2.2.0.tar.gz
Collecting typing (from py2p)
  Downloading https://files.pythonhosted.org/packages/28/b8/a1d6b7cf322f91305bcb5e7d8f6c3028954d1e3e716cddc1cdce2ac63247/typing-3.7.4-py3-none-any.whl
Collecting base58 (from py2p)
  Downloading https://files.pythonhosted.org/packages/09/b2/21ac9591f055acc145afead895edeb73bbd69d95cf366fc5c2233f2434cb/base58-1.0.3-py3-none-any.whl
Collecting u-msgpack-python (from py2p)
  Downloading https://files.pythonhosted.org/packages/da/ec/9f984fc2be20b2b78bb4e7d9ee1a13f7868d2c075e812d7a1e0a8ef30142/u_msgpack_python-2.5.2-py2.py3-none-any.whl
Collecting pyee (from py2p)
  Downloading https://files.pythonhosted.org/packages/ad/d8/5608d571ffad3d7de0192b0b3099fe3f38d87c0817ebff3cee19264f0bc2/pyee-6.0.0-py2.py3-none-any.whl
Installing collected packages: typing, async-promises, custom-inherit, base58, u-msgpack-python, pyee, py2p
  Running setup.py install for async-promises ... done
  Running setup.py install for custom-inherit ... done
Successfully installed async-promises-1.1.1 base58-1.0.3 custom-inherit-2.2.0 py2p-0.7.878 pyee-6.0.0 typing-3.7.4 u-msgpack-python-2.5.2

But the error persists. Any idea?

@LinusSkucas
Copy link
Owner

LinusSkucas commented Aug 18, 2019 via email

@adocampo
Copy link
Author

I cloned the master version today, so I guess the id is a0ae13f.
Mycroft core is also the latest, 19.2.14

@adocampo
Copy link
Author

adocampo commented Aug 20, 2019

Well, I did nothing on my Mark I and it doesn't complain now when I say "Announce that "Dinner is ready"". I fact now it responds "Alright, I'll broadcast that to all your devices." or "I'm announcing that now"
But I cannot hear anything on the other mycroft instances, instances where when I say "Announce that "Dinner is ready"" answer with the typical responses "I'm sorry, I don't understand" or "Please rephrase your request."

My Mark I is on wifi while the other mycroft instance is my computer on the same lan, but with ethernet cable. I will wait a while and restart mycroft-core several times on the computer to see if finally can communicate between them.

PS: on the computer's side, it seems to load the skill

21:01:48.569 - Communications - INFO - New Mycroft Communications device at: 192.168.1.131
21:01:48.623 - Communications - INFO - Done connecting to device
21:01:49.281 - Communications - INFO - New Mycroft Communications device at: 192.168.1.10
21:01:49.287 - Communications - INFO - Done connecting to device

PS2: After a while, announces are working!!!!! 🥂

@LinusSkucas
Copy link
Owner

LinusSkucas commented Aug 20, 2019 via email

@adocampo
Copy link
Author

adocampo commented Aug 20, 2019

arrrgggh, I went to make the dinner and now receiving computer doesn't receive the announce!!

After restarting mycroft-core on the computer twice, it began to work again... I see nothing of interest on the logs, they alway say

23:58:57.387 - Communications - INFO - New Mycroft Communications device at: 192.168.1.131
23:58:57.409 - Communications - INFO - Done connecting to device
23:58:58.200 - Communications - INFO - New Mycroft Communications device at: 192.168.1.10
23:58:58.205 - Communications - INFO - Done connecting to device

But after a while, it stops announcing from Mark I

I also noticed the high CPU usage when this skill is loaded. Usually, mycroft-core python3 process uses 1 ~ 2% CPU, just by putting the skill on /opt/mycroft/skills and letting mycroft load it, CPU arises up to 12 ~ 13% usage (I'm on a i7 CPU)

On the Mark I is even worse, when the skill is loaded, mycroft-skills process eats a entire CPU of the RPi, while when it isn't loaded, CPU usage is between 16% to 30%.

Something is eating CPU cycles...

@LinusSkucas
Copy link
Owner

LinusSkucas commented Aug 20, 2019 via email

@adocampo
Copy link
Author

Yes, those two devices are my Mark I (wlan0 192.168.1.131) and my computer (enp3s0 192.168.1.10), so the network interface names is working.

I've uninstalled the skill on both devices, just to confirm the CPU eating of the communications-skill, and re-added back.
On the Mark I it seems to be loaded just fine, and only showed the message
00:58:57.387 - Communications - INFO - New Mycroft Communications device at: 192.168.1.131

On the computer, the skill didn't log any output, so I restarted the mycroft-core on the computer The second attempt seems to show on both devices the log

01:08:50.455 - mycroft.skills.core:load_skill:151 - INFO - Loaded communications-skill
01:08:51.440 - Communications - INFO - New Mycroft Communications device at: 192.168.1.131
01:08:51.477 - Communications - INFO - Done connecting to device
01:08:52.093 - Communications - INFO - New Mycroft Communications device at: 192.168.1.10
01:08:52.099 - Communications - INFO - Done connecting to device

But didn't work either, so I'd restarted the service on the computer once again, and then it worked.

01:09:28.520 - Communications - INFO - New intercom announcement incoming!: this is a test
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layers 1, 2 and 3
        version 1.25.11; written and copyright by Michael Hipp and others
        free software (LGPL) without any warranty but with best wishes

Directory: /home/malevolent/development/mycroft-core/mycroft/res/snd/
Playing MPEG stream 1 of 1: acknowledge.mp3 ...

MPEG 1.0 L III cbr128 44100 stereo

[0:00] Decoding of acknowledge.mp3 finished.

@LinusSkucas
Copy link
Owner

LinusSkucas commented Aug 20, 2019 via email

@adocampo
Copy link
Author

adocampo commented Aug 20, 2019 via email

@LinusSkucas
Copy link
Owner

okay thanks! Please let me know if this problem comes up again!

@adocampo
Copy link
Author

Yes, the subject of this thread seems to be reproducible... I've installed it now on a Manjaro Linux (Arch Linux based distro) and the py2p error arises again. After restarting mycroft-core several times, I decided to wait... and I tried again 1h later. Then skill starts without error...

I'm not a python expert so, could it be some kind of cache and it complains of the py2p missing library even it is installed? Perhaps is something related to arch linux...

@LinusSkucas
Copy link
Owner

I bet that this is related to your environment - The skill works fine on picroft/mark 1

@adocampo
Copy link
Author

Yes, you must be right, I didn't remember any problem on the Mark I. If I have the opportunity, I'll try it on another non-archlinux distro

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants