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
Hello, I'm using this package via github.com/zulip/zulip 's irc<->zulip bridge, and am coming across the following error. The zulip integration uses the async reactor but @rht 's research says
incorrectly assumes a sync reactor and that the scheduler attribute referred to in the said code doesn't exist for the async reactor.
Could you suggest a fix here?
Full error message:
Exception in callback _SelectorSocketTransport._call_connection_lost(ReadTimeout(R...meout=15.0)")))
handle: <Handle _SelectorSocketTransport._call_connection_lost(ReadTimeout(R...meout=15.0)")))>
Traceback (most recent call last):
File "/nix/store/r85cm22i6058g4zj76w05rzvqwil6d2g-python3-3.11.1/lib/python3.11/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/nix/store/r85cm22i6058g4zj76w05rzvqwil6d2g-python3-3.11.1/lib/python3.11/asyncio/selector_events.py", line 1117, in _call_connection_lost
super()._call_connection_lost(exc)
File "/nix/store/r85cm22i6058g4zj76w05rzvqwil6d2g-python3-3.11.1/lib/python3.11/asyncio/selector_events.py", line 875, in _call_connection_lost
self._protocol.connection_lost(exc)
File "/home/zx/zulip/python-zulip-api/zulip-api-py3-venv/lib/python3.11/site-packages/irc/client_aio.py", line 82, in connection_lost
self.connection.disconnect()
File "/home/zx/zulip/python-zulip-api/zulip-api-py3-venv/lib/python3.11/site-packages/irc/client_aio.py", line 214, in disconnect
self._handle_event(Event("disconnect", self.server, "", [message]))
File "/home/zx/zulip/python-zulip-api/zulip-api-py3-venv/lib/python3.11/site-packages/irc/client.py", line 376, in _handle_event
self.reactor._handle_event(self, event)
File "/home/zx/zulip/python-zulip-api/zulip-api-py3-venv/lib/python3.11/site-packages/irc/client.py", line 922, in _handle_event
result = handler.callback(connection, event)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/zx/zulip/python-zulip-api/zulip-api-py3-venv/lib/python3.11/site-packages/irc/bot.py", line 202, in _on_disconnect
self.recon.run(self)
File "/home/zx/zulip/python-zulip-api/zulip-api-py3-venv/lib/python3.11/site-packages/irc/bot.py", line 107, in run
self.bot.reactor.scheduler.execute_after(intvl, self.check)
^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'AioReactor' object has no attribute 'scheduler'
The text was updated successfully, but these errors were encountered:
The IScheduler interface and the tempora library the implementation is based on are not designed for an async application. They assume an architecture where the application is repeatedly polling to check whether one of the scheduled jobs should run with .run_pending(). In an async application, a timer should be scheduled with the event loop (or a higher-level interface like asyncio.sleep in a task); the event loop automatically dispatches the job at the right time without polling.
Hello, I'm using this package via github.com/zulip/zulip 's irc<->zulip bridge, and am coming across the following error. The zulip integration uses the async reactor but @rht 's research says
irc/irc/bot.py
Line 107 in 4c15d34
Could you suggest a fix here?
Full error message:
The text was updated successfully, but these errors were encountered: