Reverting to 5.0.1 makes this not happen anymore. For the record, I’m running Ubuntu 22.04 with pylxd 2.3.1.
Note that the execute happens properly anyway, so this is more of an annoyance than anything functionally broken.
Here is the backtrace:
Failed to receive data
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/ws4py/websocket.py", line 394, in once
b = self.sock.recv(self.reading_buffer_size)
ConnectionResetError: [Errno 104] Connection reset by peer
Example python script used to reproduce the failure:
#!/usr/bin/env python3
import pylxd
import sys
name = sys.argv[1]
client = pylxd.Client()
container = client.containers.get(name)
_, stdout, _ = container.execute(['echo', 'Hello'])
print(stdout)