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
I've got the following Python code but for some reason telnetlib3 is causing asyncio errors (that is, saying that no asyncio runtime is available when there is one). I'm using Toga, which is inherently compatible with asyncio, yet I receive this error:
Exception in callback TelnetClient.connection_made(<_ProactorSoc...sport fd=1900>)
handle: <Handle TelnetClient.connection_made(<_ProactorSoc...sport fd=1900>)>
Traceback (most recent call last):
File "C:\Users\ethin\AppData\Local\Programs\Python\Python312\Lib\asyncio\events.py", line 84, in _run
self._context.run(self._callback, *self._args)
File "C:\Users\ethin\source\venvs\mudclient\Lib\site-packages\telnetlib3\client.py", line 74, in connection_made
super().connection_made(transport)
File "C:\Users\ethin\source\venvs\mudclient\Lib\site-packages\telnetlib3\client_base.py", line 137, in connection_made
self.reader = reader_factory(**reader_kwds)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ethin\source\venvs\mudclient\Lib\site-packages\telnetlib3\stream_reader.py", line 497, in __init__
super().__init__(limit=limit)
File "C:\Users\ethin\source\venvs\mudclient\Lib\site-packages\telnetlib3\stream_reader.py", line 39, in __init__
self._loop = asyncio.get_event_loop_policy().get_event_loop()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\ethin\AppData\Local\Programs\Python\Python312\Lib\asyncio\events.py", line 698, in get_event_loop
raise RuntimeError('There is no current event loop in thread %r.'
RuntimeError: There is no current event loop in thread 'Dummy-1'.
File "C:\Users\ethin\source\venvs\mudclient\Lib\site-packages\telnetlib3\client_base.py", line 185, in data_received
recv_inband = self.writer.feed_byte(bytes([byte]))
^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'feed_byte'
File "C:\Users\ethin\source\venvs\mudclient\Lib\site-packages\telnetlib3\client_base.py", line 185, in data_received
recv_inband = self.writer.feed_byte(bytes([byte]))
^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'feed_byte'
# Infinite more AttributeError exceptions
I'm unsure what I'm doing wrong. I set the shell to None, specifically because I handle the shell differently, but other than that I'm unsure what the problem is. The full code follows:
I've got the following Python code but for some reason telnetlib3 is causing asyncio errors (that is, saying that no asyncio runtime is available when there is one). I'm using Toga, which is inherently compatible with asyncio, yet I receive this error:
I'm unsure what I'm doing wrong. I set the
shell
to None, specifically because I handle the shell differently, but other than that I'm unsure what the problem is. The full code follows:Do I need to explicitly set the shell to a callback?
The text was updated successfully, but these errors were encountered: