On Thursday, 20 March 2014 00:07:12 UTC+5:30, M S Vishwanath Bhat wrote:Hi,
I am a newbie to python in general and rpyc in particular. Please forgive my ignorance.
How can I achieve file transfer.
I added the file open part in my service.py in server. And then I ran both my own rpyc service and rpyc_classic.py.
Now I use the client to to copy_to_server and I still get the write error.
Any help is appreciated.
I have connected to my service and the file is being opened with same connection. Should I connect to classic service and use that to open a file remotely.
BTW this is the traceback I get
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "run_helper.py", line 99, in copy_to_server
shutil.copyfileobj(localc, remotec)
File "/usr/lib64/python2.6/shutil.py", line 31, in copyfileobj
fdst.write(buf)
File "/usr/lib/python2.6/site-packages/rpyc/core/netref.py", line 150, in __getattr__
return syncreq(self, consts.HANDLE_GETATTR, name)
File "/usr/lib/python2.6/site-packages/rpyc/core/netref.py", line 71, in syncreq
return conn.sync_request(handler, oid, *args)
File "/usr/lib/python2.6/site-packages/rpyc/core/protocol.py", line 438, in sync_request
raise obj
AttributeError: cannot access 'write'
========= Remote Traceback (1) =========
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/rpyc/core/protocol.py", line 300, in _dispatch_request
res = self._HANDLERS[handler](self, *args)
File "/usr/lib/python2.6/site-packages/rpyc/core/protocol.py", line 538, in _handle_getattr
return self._access_attr(oid, name, (), "_rpyc_getattr", "allow_getattr", getattr)
File "/usr/lib/python2.6/site-packages/rpyc/core/protocol.py", line 501, in _access_attr
raise AttributeError("cannot access %r" % (name,))
AttributeError: cannot access 'write'
MS
--
---
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 rpyc+uns...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Use c.builtin.open (or builtins, can't remember), not c.root.open
--
Hi,I want to run this service on the boot computer.I think to run it on service, but I have a problems on it.Do you have idea?
--
---
You received this message because you are subscribed to a topic in the Google Groups "rpyc" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rpyc/91kMD-wy5vk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rpyc+uns...@googlegroups.com.
-> shutil.copyfileobj(remoteFile, localFile)
(Pdb) shutil.copyfileobj(remoteFile, localFile)