Error msg:

Traceback (most recent call last):
File "/home/hpcm/Desktop/test/install/client.py", line 9, in <module>
print(s_obj.root.new())
File "/home/hpcm/.local/lib/python3.5/site-packages/rpyc/core/netref.py", line 159, in __getattr__
return syncreq(self, consts.HANDLE_GETATTR, name)
File "/home/hpcm/.local/lib/python3.5/site-packages/rpyc/core/netref.py", line 75, in syncreq
return conn.sync_request(handler, proxy, *args)
File "/home/hpcm/.local/lib/python3.5/site-packages/rpyc/core/protocol.py", line 471, in sync_request
return self.async_request(handler, *args, timeout=timeout).value
File "/home/hpcm/.local/lib/python3.5/site-packages/rpyc/core/async_.py", line 97, in value
raise self._obj
AttributeError: cannot access 'new' ========= Remote Traceback (1) =========
Traceback (most recent call last):
File "/home/hpcm/.local/lib/python3.5/site-packages/rpyc/core/protocol.py", line 329, in _dispatch_request
res = self._HANDLERS[handler](self, *args)
File "/home/hpcm/.local/lib/python3.5/site-packages/rpyc/core/protocol.py", line 596, in _handle_getattr
return self._access_attr(obj, name, (), "_rpyc_getattr", "allow_getattr", getattr)
File "/home/hpcm/.local/lib/python3.5/site-packages/rpyc/core/protocol.py", line 538, in _access_attr
name = self._check_attr(obj, name, param)
File "/home/hpcm/.local/lib/python3.5/site-packages/rpyc/core/protocol.py", line 523, in _check_attr
raise AttributeError("cannot access %r" % (name,))
AttributeError: cannot access 'new'

错误原因:

服务端和客户端rpyc版本不一致, 会导致connect能成功, 但是不能调用方法
解决方法:

  使用相同版本的rpyc

04-28 08:18