JarbasHiveMind / skill-hivemind

HiveMind core skill
Apache License 2.0
5 stars 5 forks source link

mycroft-cli-client crashing after hivemind-skill and skill-node-red install #1

Open emphasize opened 4 years ago

emphasize commented 4 years ago

Admittedly a pretty bad timing since 20.8-1 just hit, but after installing your two skills the websocket couldn't connect to anything and after reboot the cli is crashing with

Starting background service skills
Starting cli
Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 183, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.7/runpy.py", line 109, in _get_module_details
    __import__(pkg_name)
  File "/home/pi/mycroft-core/mycroft/__init__.py", line 18, in <module>
    from mycroft.messagebus.message import Message
  File "/home/pi/mycroft-core/mycroft/messagebus/__init__.py", line 14, in <modu                                                                                                                               le>
    from .client.client import MessageBusClient
  File "/home/pi/mycroft-core/mycroft/messagebus/client/__init__.py", line 14, i                                                                                                                               n <module>
    from .client import MessageBusClient, MessageWaiter
  File "/home/pi/mycroft-core/mycroft/messagebus/client/client.py", line 30, in                                                                                                                                <module>
    from pyee import ExecutorEventEmitter
ImportError: cannot import name 'ExecutorEventEmitter' from 'pyee' (/home/pi/myc                                                                                                                               roft-core/.venv/lib/python3.7/site-packages/pyee/__init__.py)

To be more transparent, i want to access node red which runs on my pi server (ie not on my mycroft client's pi). Do i still have to install nodejs (since pyee is throwing this) or has this something to do with having no key? (do i have hivemind-core setup alongside mycroft-core to get such a key?) On home.mycroft.ai's web ui there was no entry for the "Hive Mind" and after a reboot the connection to Selene is cut off.

Cheers

edit: oh, there is no ExecutorEventEmmiter/BaseEventEmitter class in pyee's init.py (sorry for wrong skill issue) hm... pyee 5.0.0 ist installed, yet mycroft-core requires 7.0.1 (yet reports requirements are met)

I will issue that in mycroft-core since forcing 7.0.1 results in ERROR: mycroft-messagebus-client 0.8.1 has requirement pyee==5.0.0, but you'll have pyee 7.0.1 which is incompatible.

emphasize commented 4 years ago

Rerun dev_setup.sh brought it back to 7.0.1. Something is pushing mycroft-messagebus-client to 0.8.1on your side.

If i understand the code correctly you can set a "secret" in the .conf, right?

JarbasAl commented 4 years ago

looks like a package version conflict, i can probably upgrade on my side to fix this

please open different issues with specific questions, if only to make it easier to future users to search

Hivemind allows you setting an encryption key and it will use AES to encrypt all messages, you are supposed to share this key off band, usually you set it manually in the client side .conf, this would keep you safe even if exposed to man in the middle attacks, in a way it mitigates using self signed certs with ssl, i know documentation is currently lacking but i will try to write something up soon

JarbasAl commented 4 years ago

i will also test the latest mycroft version, might be something on their side

keiner99 commented 3 years ago

I have the same problem: ERROR: mycroft-messagebus-client 0.8.1 has requirement pyee==5.0.0, but you'll have pyee 7.0.1 which is incompatible.

does anyone know how to fix that?

ChanceNCounter commented 3 years ago

@keiner99 Can you tell us a little about your environment, before we dive in? Also, are you running Mycroft on the dev or stable branch?

keiner99 commented 3 years ago

@ChanceNCounter thanks for your reply! I'm running picroft with stable branch. I want to run this awesome node-red-skill to automate some things :)

Problem is, Pyee 8.10 with node-red-skill is not working, websocket is connected, but pyee won't submit any requests to node-red with Pyee 7.0.1 requests are submitted to node-red-skill, but most of the skills in mycroft are not working anymore..

ChanceNCounter commented 3 years ago

Well, the Pyee 7.0.1 req must be way down there, because I can't seem to find it in any of our repos along the chain.

@JarbasAl I don't have the Pi nor the NodeRed device to dig in...

JarbasAl commented 3 years ago

i need to dig into where this happens... i ran into it some time ago in a different project. this is because of adapt, mycroft-messagebus-client seems to be pinned to some lower version (because mycroft wasnt compatible back then), mycroft meanwhile relaxed its dependencies

can you try to install adapt-parser==0.3.7 and mycroft-messagebus-client==0.8.4 and see if that solves it?

keiner99 commented 3 years ago

@JarbasAl adapt-parser==0.3.7 and mycroft-messagebus-client==0.8.4 are already installed

if I type or say anything in mycroft I get this error from jarbas_hive_mind_red:

Traceback (most recent call last): File "/usr/lib/python3.7/concurrent/futures/_base.py", line 324, in _invoke_callbacks callback(self) File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/pyee/_executor.py", line 56, in _callback self.emit('error', exc) File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/pyee/_base.py", line 116, in emit self._emit_handle_potential_error(event, args[0] if args else None) File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/pyee/_base.py", line 86, in _emit_handle_potential_error raise error File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/jarbas_hive_mind_red/__init__.py", line 170, in handle_outgoing_mycroft elif peer and peer in self.clients: TypeError: unhashable type: 'list' 17:40:24.607 - concurrent.futures - ERROR - exception calling callback for <Future at 0x721668d0 state=finished raised TypeError> Traceback (most recent call last): File "/usr/lib/python3.7/concurrent/futures/_base.py", line 324, in _invoke_callbacks callback(self) File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/pyee/_executor.py", line 56, in _callback self.emit('error', exc) File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/pyee/_base.py", line 116, in emit self._emit_handle_potential_error(event, args[0] if args else None) File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/pyee/_base.py", line 86, in _emit_handle_potential_error raise error File "/usr/lib/python3.7/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/jarbas_hive_mind_red/__init__.py", line 170, in handle_outgoing_mycroft elif peer and peer in self.clients: TypeError: unhashable type: 'list'