Closed kimfaint closed 1 year ago
have the same issue:
import pylxd
lxd = pylxd.Client()
first= lxd.containers.all()[0]
a,b,c=first.execute(["ls","-lah"])
print(a)
print(b)
print(c)
/usr/lib/python3/dist-packages/pylxd/models/operation.py:76: UserWarning: Attempted to set unknown attribute "location" on instance of "Operation"
warnings.warn(
Failed to receive data
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/ws4py/websocket.py", line 390, in once
b = self.sock.recv(self.reading_buffer_size)
ConnectionResetError: [Errno 104] Connection reset by peer
0
total 756K
drwx------ 1 root root 152 Oct 27 09:05 .
drwxr-xr-x 1 root root 160 Oct 25 12:58 ..
-rw------- 1 root root 4.0K Oct 31 20:39 .bash_history
-rw-r--r-- 1 root root 3.1K Oct 15 2021 .bashrc
drwx------ 1 root root 58 Oct 27 08:54 .cache
drwx------ 1 root root 30 Oct 27 08:54 .config
-rw------- 1 root root 20 Oct 26 12:54 .lesshst
drwxr-xr-x 1 root root 10 Oct 26 12:25 .local
-rw-r--r-- 1 root root 161 Jul 9 2019 .profile
drwx------ 1 root root 82 Oct 27 08:57 .ssh
I am consistently getting an error with the container.execute method.
For example:
When run:
So the execute is successful, the correct data seems to be returned in the exit_code and output. Yet is is printing a Failed to receive data error. I think this started sometime within the last month.
Also this is using ws4py==0.5.1.