Tomer,
I've been building a distributed test tool using rpyc and I've run
across the following issue.  I'm using rpyc.Service with the following
config:
{'allow_all_attrs' : True, 'allow_public_attrs' : True,
'allow_pickle' : True}

When my client calls the method below, passing a file object (or
netref to a file object), my remote host has no problem reading from
the file one line at a time, but if I instead call read() on file_obj
or try using shutil.copyfileobj(), I get the following exception:
AttributeError: cannot access 'read'

I'm not sure why this is happening, is there some other config
variable I need to enable?  I'm guessing that classic mode would
alleviate

def exposed_write_remote_file(self,file_path,file_obj):
        local_file = open(file_path,'wb')
        for line in file_obj:
            local_file.write(line)
 
#file_obj.close()
        local_file.close()

By the way, RPyC is excellent.  Thanks for building/maintaining such a
useful library.

Matt

Reply via email to