New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pyee error | exception calling callback for <Future at 0x737d75f0 state=finished raised KeyError> #2695
Comments
Could you try to set the log level to debug by entering the cli command It looks like an error shown when the |
Darn, no additional info if I'm reading those screenshots correctly. I couldn't reproduce it yesterday but will try some more. |
@forslund sorry :/ |
Just an idea here. If the user or some skill installs the "mycroft-messagebus-client" pip package, there is a pyee version conflict as the messagebus-client is still using pyee==5.0.1 MycroftAI/mycroft-messagebus-client#4 I am seeing that when installing systemwide as --user option. Not sure if it also occurs within a venv. Perhaps it is related as it is about pyee. |
If that happens I do believe (after testing) the errors occurring would be ImportErrors since the ExecutorEventEmitter class isn't available. |
After some more probing and chatting with Ake, I think this might be the We still need to verify this and if true, perhaps ensure that each function registered is unique. |
So I did some testing and each function registered is unique. I think the issue here is non-fatal since the exception is catched and reported. My tests makes me believe the issue is a race condition between the timeout (which removes the handler) and the pyee I've seen the error myself randomly and added some extra logging to see if I can pinpoint where in mycroft's code it gets triggered. Somewhere in the skills process... |
I opened an issue upstream. |
Ok a fix to my theoretical observation has been merged in pyee and released as 8.1.0. I'll prepare a PR here and on Adapt to get the versions synced and we'll see if that resolves the issue. Otherwise there's some other issue as well :) |
Hi, I'm going to close this issue for now. The proposed update to resolved this has been accepted upstream and Mycroft has included it. In addition the functionality handling this has been moved out from core into mycroft-messagebus-client. If you're still seeing this issue please reopen the issue there. |
How to submit an Issue to a Mycroft repository
When submitting an Issue to a Mycroft repository, please follow these guidelines to help us help you.
Be clear about the software, hardware and version you are running
For example:
Try to provide steps that we can use to replicate the Issue
For example:
Provide log files or other output to help us see the error
20:00:14.407 | ERROR | 949 | concurrent.futures | exception calling callback for <Future at 0x737d7b10 state=finished raised KeyError>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 60, in _callback self.emit('error', exc) File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/pyee/_base.py", line 111, 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 83, 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/pyee/_base.py", line 121, in g self.remove_listener(event, f) File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/pyee/_base.py", line 136, in remove_listener self._events[event].pop(f)KeyError: <bound method MessageWaiter._handler of <mycroft.messagebus.client.client.MessageWaiter object at 0xb2e8fd90>> 20:00:14.408 | ERROR | 949 | concurrent.futures | exception calling callback for <Future at 0x737d79d0 state=finished raised KeyError>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 60, in _callback self.emit('error', exc) File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/pyee/_base.py", line 111, 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 83, 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/pyee/_base.py", line 121, in g self.remove_listener(event, f) File "/home/pi/mycroft-core/.venv/lib/python3.7/site-packages/pyee/_base.py", line 136, in remove_listener self._events[event].pop(f)KeyError: <bound method MessageWaiter._handler of <mycroft.messagebus.client.client.MessageWaiter object at 0x7514b7b0>>
The text was updated successfully, but these errors were encountered: