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 wanted to connect to slave service server with client service as MasterService/ClassicClient to avoid serving as slave to server. With this client connection, I am facing below error while executing command on remote server using subprocess.run with env={}
conn.modules.subprocess.run("ls", shell=True, timeout=10, capture_output=True) --> Working
conn.modules.subprocess.run("ls", shell=True, timeout=10, capture_output=True, env={}) --> Through exception as below
stack trace / error log
conn.modules.subprocess.run("ls", shell=True, timeout=10, capture_output=True, env={})
Traceback (most recent call last):
File "", line 1, in
File "/colossus/.local/lib/python3.10/site-packages/rpyc/core/netref.py", line 239, in call
return syncreq(_self, consts.HANDLE_CALL, args, kwargs)
File "/colossus/.local/lib/python3.10/site-packages/rpyc/core/netref.py", line 63, in syncreq
return conn.sync_request(handler, proxy, *args)
File "/colossus/.local/lib/python3.10/site-packages/rpyc/core/protocol.py", line 744, in sync_request
return async_res.value
File "/colossus/.local/lib/python3.10/site-packages/rpyc/core/async.py", line 111, in value
raise self._obj
_get_exception_class..Derived: cannot access 'items'
========= Remote Traceback (2) =========
Traceback (most recent call last):
File "/colossus/.local/lib/python3.10/site-packages/rpyc/core/protocol.py", line 369, in _dispatch_request
res = self._HANDLERS[handler](self, *args)
File "/colossus/.local/lib/python3.10/site-packages/rpyc/core/protocol.py", line 863, in _handle_call
return obj(*args, **dict(kwargs))
File "/usr/lib/python3.10/subprocess.py", line 503, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.10/subprocess.py", line 971, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.10/subprocess.py", line 1779, in _execute_child
for k, v in env.items():
File "/colossus/.local/lib/python3.10/site-packages/rpyc/core/netref.py", line 152, in getattr
return syncreq(self, consts.HANDLE_GETATTR, name)
File "/colossus/.local/lib/python3.10/site-packages/rpyc/core/netref.py", line 63, in syncreq
return conn.sync_request(handler, proxy, *args)
File "/colossus/.local/lib/python3.10/site-packages/rpyc/core/protocol.py", line 744, in sync_request
return async_res.value
File "/colossus/.local/lib/python3.10/site-packages/rpyc/core/async.py", line 111, in value
raise self._obj
_get_exception_class..Derived: cannot access 'items'
========= Remote Traceback (1) =========
Traceback (most recent call last):
File "/colossus/.local/lib/python3.10/site-packages/rpyc/core/protocol.py", line 369, in _dispatch_request
res = self._HANDLERS[handler](self, *args)
File "/colossus/.local/lib/python3.10/site-packages/rpyc/core/protocol.py", line 879, in _handle_getattr
return self._access_attr(obj, name, (), "_rpyc_getattr", "allow_getattr", getattr)
File "/colossus/.local/lib/python3.10/site-packages/rpyc/core/protocol.py", line 806, in _access_attr
name = self._check_attr(obj, name, param)
File "/colossus/.local/lib/python3.10/site-packages/rpyc/core/protocol.py", line 796, in _check_attr
raise AttributeError(f"cannot access {name!r}")
AttributeError: cannot access 'items'
I wanted to connect to slave service server with client service as MasterService/ClassicClient to avoid serving as slave to server. With this client connection, I am facing below error while executing command on remote server using subprocess.run with env={}
========= Remote Traceback (2) =========
Traceback (most recent call last):
File "/colossus/.local/lib/python3.10/site-packages/rpyc/core/protocol.py", line 369, in _dispatch_request
res = self._HANDLERS[handler](self, *args)
File "/colossus/.local/lib/python3.10/site-packages/rpyc/core/protocol.py", line 863, in _handle_call
return obj(*args, **dict(kwargs))
File "/usr/lib/python3.10/subprocess.py", line 503, in run
with Popen(*popenargs, **kwargs) as process:
File "/usr/lib/python3.10/subprocess.py", line 971, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.10/subprocess.py", line 1779, in _execute_child
for k, v in env.items():
File "/colossus/.local/lib/python3.10/site-packages/rpyc/core/netref.py", line 152, in getattr
return syncreq(self, consts.HANDLE_GETATTR, name)
File "/colossus/.local/lib/python3.10/site-packages/rpyc/core/netref.py", line 63, in syncreq
return conn.sync_request(handler, proxy, *args)
File "/colossus/.local/lib/python3.10/site-packages/rpyc/core/protocol.py", line 744, in sync_request
return async_res.value
File "/colossus/.local/lib/python3.10/site-packages/rpyc/core/async.py", line 111, in value
raise self._obj
_get_exception_class..Derived: cannot access 'items'
========= Remote Traceback (1) =========
Traceback (most recent call last):
File "/colossus/.local/lib/python3.10/site-packages/rpyc/core/protocol.py", line 369, in _dispatch_request
res = self._HANDLERS[handler](self, *args)
File "/colossus/.local/lib/python3.10/site-packages/rpyc/core/protocol.py", line 879, in _handle_getattr
return self._access_attr(obj, name, (), "_rpyc_getattr", "allow_getattr", getattr)
File "/colossus/.local/lib/python3.10/site-packages/rpyc/core/protocol.py", line 806, in _access_attr
name = self._check_attr(obj, name, param)
File "/colossus/.local/lib/python3.10/site-packages/rpyc/core/protocol.py", line 796, in _check_attr
raise AttributeError(f"cannot access {name!r}")
AttributeError: cannot access 'items'
Environment
Minimal example
Server:
Client:
The text was updated successfully, but these errors were encountered: