When I close rpyc pexpect spawn object, I got the error "AttributeError:
'spawn' object has no attribute 'close()' " in the rpyc server stdout.
BUT pexpect.spawn object has close method.
BTW : Running pecpect locally (without rpyc) there is no problem to run the
close method.
Any idea why I get this error?
*here is the flow :*
- On the remote_host i starting rpyc server.
- from my leptop I running : rpyc connection + run rpyc spawn on the
remote_host + close the spawn object.
Here is the code :
*conn=rpyc.classic.connect('remote_host')*
*remote_spawn = conn.modules.pexpect.spawn('/tmp/script.sh')*
*remote_spawn.close()
*
- When the close() executed i got the following error in the stdout of
the rpyc server (On the remote_host) :
*DEBUG:SLAVE/18812:Exception caught*
*Traceback (most recent call last):*
* File
"/var/tmp/xavi-xpyv/lib/python2.7/site-packages/rpyc-3.2.2-py2.7.egg/rpyc/core/protocol.py",
line 300, in _dispatch_request*
* res = self._HANDLERS[handler](self, *args)*
* File
"/var/tmp/xavi-xpyv/lib/python2.7/site-packages/rpyc-3.2.2-py2.7.egg/rpyc/core/protocol.py",
line 538, in _handle_getattr*
* return self._access_attr(oid, name, (), "_rpyc_getattr",
"allow_getattr", getattr)*
* File
"/var/tmp/xavi-xpyv/lib/python2.7/site-packages/rpyc-3.2.2-py2.7.egg/rpyc/core/protocol.py",
line 504, in _access_attr*
* return accessor(obj, name, *args)*
*AttributeError: 'spawn' object has no attribute 'close()'*
*DEBUG:SLAVE/18812:Exception caught*
*Traceback (most recent call last):*
* File
"/var/tmp/xavi-xpyv/lib/python2.7/site-packages/rpyc-3.2.2-py2.7.egg/rpyc/core/protocol.py",
line 300, in _dispatch_request*
* res = self._HANDLERS[handler](self, *args)*
* File
"/var/tmp/xavi-xpyv/lib/python2.7/site-packages/rpyc-3.2.2-py2.7.egg/rpyc/core/protocol.py",
line 538, in _handle_getattr*
* return self._access_attr(oid, name, (), "_rpyc_getattr",
"allow_getattr", getattr)*
* File
"/var/tmp/xavi-xpyv/lib/python2.7/site-packages/rpyc-3.2.2-py2.7.egg/rpyc/core/protocol.py",
line 504, in _access_attr*
* return accessor(obj, name, *args)*
*AttributeError: 'spawn' object has no attribute 'close()'*
Thanks