You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ERROR: Unhandled exception in opsdroid, exiting...
Caught exception
{'message': 'Task exception was never retrieved', 'exception': AttributeError("'NoneType' object has no attribute 'close'"), 'future': <Task finished name='Task-3' coro=<OpsDroid.handle_stop_signal() done, defined at /usr/local/lib/python3.9/dist-packages/opsdroid/core.py:162> exception=AttributeError("'NoneType' object has no attribute 'close'")>}
Traceback (most recent call last):
File "/usr/local/bin/opsdroid", line 8, in <module>
sys.exit(cli())
File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1128, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1053, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1659, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 1395, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.9/dist-packages/click/core.py", line 754, in invoke
return __callback(*args, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/opsdroid/cli/start.py", line 43, in start
opsdroid.run()
File "/usr/local/lib/python3.9/dist-packages/opsdroid/core.py", line 176, in run
self.eventloop.run_until_complete(self.start())
File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/usr/local/lib/python3.9/dist-packages/opsdroid/core.py", line 199, in start
await self._run_tasks()
File "/usr/local/lib/python3.9/dist-packages/opsdroid/core.py", line 210, in _run_tasks
await asyncio.gather(*self.tasks)
File "/usr/local/lib/python3.9/dist-packages/opsdroid/connector/matrix/connector.py", line 345, in listen
await self.opsdroid.parse(event)
File "/usr/local/lib/python3.9/dist-packages/opsdroid/core.py", line 650, in parse
await asyncio.gather(*tasks)
File "/usr/local/lib/python3.9/dist-packages/opsdroid/parsers/event_type.py", line 55, in parse_event_type
if not constraint(event):
File "/usr/local/lib/python3.9/dist-packages/opsdroid/constraints.py", line 34, in constraint_callback
if hasattr(message.connector, "lookup_target"):
AttributeError: 'NoneType' object has no attribute 'connector'
Steps to Reproduce
Please also include relevant information and steps to reproduce the bug/issue.
I use @constrain_rooms(['...']) in my skill (https://gitlab.com/raywiss/skill-feed/-/tree/main) and after I added some feeds to rooms in the background I started getting exceptions like above.
Expected Functionality
I shouldn't get exceptions...
Versions
Opsdroid version: 0.28
Python version: 3.9
OS/Docker version: Debian
Additional Details
I changed the constraints.py line 34 from
if hasattr(message.connector, "lookup_target"):
to
if hasattr(message, "connector") and hasattr(message.connector, "lookup_target"):
I don't know why the message is a NoneType :(
The text was updated successfully, but these errors were encountered:
It happens when I kick someone from the room. It generates an event in Matrix which is some kind on "state" event and not a message...
szimszon
changed the title
constraints.py, line 34, in constraint_callback 'NoneType' object has no attribute 'connector'
[maybe Matrix related] constraints.py, line 34, in constraint_callback 'NoneType' object has no attribute 'connector'
Dec 21, 2022
Description
Steps to Reproduce
Please also include relevant information and steps to reproduce the bug/issue.
I use @constrain_rooms(['...']) in my skill (https://gitlab.com/raywiss/skill-feed/-/tree/main) and after I added some feeds to rooms in the background I started getting exceptions like above.
Expected Functionality
I shouldn't get exceptions...
Versions
Additional Details
I changed the constraints.py line 34 from
to
I don't know why the message is a NoneType :(
The text was updated successfully, but these errors were encountered: