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.
RPyC supports bidirectional communication; so, client.py behaves as a server and a client in your use case. Being so, it must be configured to allow_public_attrs: True when you would like server.py to access public attributes of remote objects belonging to client.py. server.py
import rpyc
class TimeService(rpyc.Service):
def exposed_get_a_dict(self, a):
print(a)
for k, v in a.items():
print(k)
return "asdf"
s = rpyc.utils.server.ThreadedServer(TimeService, port=18871, protocol_config={
'allow_public_attrs': True, 'sync_request_timeout': 10})
s.start()
comrumino
added
Done
The issue discussion is exhausted and is closed w/ comment
and removed
To Start
Description reviewed and a maintainer needs "to start" triage
labels
Sep 23, 2019
Hi,
thanks to #272 i was able to access a dict on the client side. however, I'm unable to transfer a dict from client to server and access items().
Server:
Client:
causes: AttributeError: cannot access 'items'
Is there another protocol_config which is required for that?
Used version: ubuntu 19.04, python3, current RPyC version
regards,
Ralf
The text was updated successfully, but these errors were encountered: