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'm using the latest version of Fabric with Textual (a TUI) and am experiencing random disconnections when clicking around in the UI I created. I tested the code below by itself and did not experience any disconnecting, but when using it with Textual is what starts the issue. Any help here would be appreciated as I've tried paramiko by itself and asyncssh without any issue but I'd prefer to use Fabric since my app is already built for it.
Test code:
connection = Connection(host=tab.machine.host_name, connect_timeout=5)
while True:
command = "echo 'hello'"
result = connection.run(command)
tab.logger.info(result.stdout)
sleep(1)
The error I get is:
ThreadException:
Saw 1 exceptions within threads (OSError):
Thread args: {'kwargs': {'echo': None,
'input_': <_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8'>,
'output': <textual.app._PrintCapture object at 0x103a79750>},
'target': <bound method Runner.handle_stdin of <fabric.runners.Remote object at 0x104095350>>}
Traceback (most recent call last):
File "/Users/cthompson/Library/Caches/pypoetry/virtualenvs/app-mQ1EG55C-py3.11/lib/python3.11/site-packages/invoke/util.py", line 211, in run
super().run()
File "/Users/cthompson/.pyenv/versions/3.11.4/lib/python3.11/threading.py", line 975, in run
self._target(*self._args, **self._kwargs)
File "/Users/cthompson/Library/Caches/pypoetry/virtualenvs/app-mQ1EG55C-py3.11/lib/python3.11/site-packages/invoke/runners.py", line 877, in handle_stdin
self.write_proc_stdin(data)
File "/Users/cthompson/Library/Caches/pypoetry/virtualenvs/app-mQ1EG55C-py3.11/lib/python3.11/site-packages/invoke/runners.py", line 1017, in write_proc_stdin
self._write_proc_stdin(data.encode(self.encoding))
File "/Users/cthompson/Library/Caches/pypoetry/virtualenvs/app-mQ1EG55C-py3.11/lib/python3.11/site-packages/fabric/runners.py", line 92, in _write_proc_stdin
return self.channel.sendall(data)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/cthompson/Library/Caches/pypoetry/virtualenvs/app-mQ1EG55C-py3.11/lib/python3.11/site-packages/paramiko/channel.py", line 844, in sendall
sent = self.send(s)
^^^^^^^^^^^^
File "/Users/cthompson/Library/Caches/pypoetry/virtualenvs/app-mQ1EG55C-py3.11/lib/python3.11/site-packages/paramiko/channel.py", line 799, in send
return self._send(s, m)
^^^^^^^^^^^^^^^^
File "/Users/cthompson/Library/Caches/pypoetry/virtualenvs/app-mQ1EG55C-py3.11/lib/python3.11/site-packages/paramiko/channel.py", line 1196, in _send
raise socket.error("Socket is closed")
OSError: Socket is closed
The text was updated successfully, but these errors were encountered:
Hello,
I'm using the latest version of
Fabric
withTextual
(a TUI) and am experiencing random disconnections when clicking around in the UI I created. I tested the code below by itself and did not experience any disconnecting, but when using it withTextual
is what starts the issue. Any help here would be appreciated as I've triedparamiko
by itself andasyncssh
without any issue but I'd prefer to useFabric
since my app is already built for it.Test code:
The error I get is:
The text was updated successfully, but these errors were encountered: