I wasn't aware that this feature needed to be turned on. 
A gent has answered this question for me in the aforementioned link. 
I was missing the allo_setattr like this:

protocol_config={"allow_all_attrs":True,
                                 "allow_setattr": True,
                                 "allow_delattr": True,})


On Monday, 18 January 2016 19:30:56 UTC, Mentaal wrote:
>
> Hi Guys, 
> First post here :)
> First time using rpyc too and thus far it's a magical tool!
> I have one small hiccup. I am serving up a repote API using rpyc which 
> uses properties. 
> While I can read from the properties in question, I cannot update them. 
> Is this a limitation of RPyC?
>
> I had posted a question on stack overflow: 
> http://stackoverflow.com/questions/34844127/using-rpyc-to-update-properties-on-a-remote-object
> before realizing that this is the better place so I'll just copy and paste 
> it here:
>
> I am using rpyc within an application and have come across a small hiccup. 
>
> I would just like to know if it's possible to update remote properties?
>
> I have a test server:
>
> import rpycfrom rpyc.utils.server import ThreadedServer
> class Test:
>     def __init__(self):
>         self._v = 0
>
>     @property
>     def V(self):
>         return self._v
>
>     @V.setter
>     def V(self, value):
>         self._v = value
>
> class TestService(rpyc.Service):
>
>     def exposed_Test(self):
>         return Test()
> if __name__ == '__main__':
>
>     t = ThreadedServer(TestService, port = 2942,
>                     protocol_config={"allow_all_attrs":True})
>     t.start()
>
> and within an ipython console:
>
> In [1]: import rpyc
> In [2]: conn = rpyc.connect('localhost', 2942, 
> config={'allow_all_attrs':True})
> In [3]: test = conn.root.Test()
> In [4]: test.VOut[4]: 0
> In [5]: test.V = 
> 2---------------------------------------------------------------------------AttributeError
>                             Traceback (most recent call 
> last)<ipython-input-5-d3ae0dcd1075> in <module>()----> 1 test.V = 2<blah blah 
> traceback>AttributeError: cannot access 'V'
>
> Is it possible to update remote properties at all?
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"rpyc" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to