5
클라이언트에서 서버로 RPyC를 사용하여 객체를 매개 변수로 전달하려고합니다. 그러나 서버가 객체에 액세스 할 수 없으며 AttributeError를 수신합니다.rpyc에서 객체 전달에 실패했습니다.
서버 코드 : 나는 RPyC 서비스를 사용하고 웹 사이트에 accoding의하고
self._conn = connect(agent_host, agent_port, config = {"allow_public_attrs" : True})
return self._conn.root.func(obj)
returns: AttributeError: cannot access 'name'.
class AgentService(rpyc.Service):
def exposed_func(self, obj):
return obj.name
클라이언트 코드이 작동합니다.
아이디어가 있으십니까?
David, 편집 해 주셔서 감사합니다. 훨씬 전문적으로 보입니다. – Ben