[Python] passing object in rpyc fails

Discussão em 'Python' iniciado por Stack, Abril 23, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to pass an object as a paramater using RPyC from the client to the server. But the server is unable to access the object and I receive an AttributeError.

    Server Code:

    class AgentService(rpyc.Service):
    def exposed_func(self, obj):
    return obj.name


    client code

    self._conn = connect(agent_host, agent_port, config = {"allow_public_attrs" : True})
    return self._conn.root.func(obj)


    returns: AttributeError: cannot access 'name'.

    I am using RPyC services and accoding to the website, this should work.

    Any ideas?

    Continue reading...

Compartilhe esta Página