I'm guessing it is trying to import from the pythonpath, which doesn't 
include the temp directory (which is why installing rpyc on the remote 
server fixed the issue). Check your deployed-rpyc.py file to make sure that 
it's setting the python path to that location first (sys.path.insert(0, 
here)). 

On Monday, January 13, 2014 12:58:09 PM UTC-5, Nicholas Lippis wrote:
>
> I am evaluating using zero-deploy for a project I am working on and I have 
> been hitting an issue.
>
> Whenever I try to run the server = DeployedServer(mach) command in the 
> python interpreter I get an error specifying that there is no such module 
> as rpyc.utils.server.  I have run this command on two linux devices, one 
> being a polky linux based server and another running standard Ubuntu 12.04 
> LTS and received the same result. Sample output is provided below.
>
> Python 2.7.3 (default, Sep 26 2013, 20:03:06)
>
> [GCC 4.6.3] on linux2
>
> Type "help", "copyright", "credits" or "license" for more information.
>
> >>>
>
> >>> from rpyc.utils.zerodeploy import DeployedServer
>
> >>> from plumbum import SshMachine
>
> >>> mach = SshMachine("192.168.1.10","user")
>
> >>> server = DeployedServer(mach)
>
> Traceback (most recent call last):
>
>   File "<stdin>", line 1, in <module>
>
>   File 
> "/home/projects/vBroker/vBroker/local/lib/python2.7/site-packages/rpyc-3.3.0-py2.7.egg/rpyc/utils/zerodeploy.py",
>  
> line 113, in __init__
>
>     raise ProcessExecutionError(self.proc.argv, self.proc.returncode, line 
> + stdout, stderr)
>
> plumbum.commands.processes.ProcessExecutionError: Command line: 
> ['/usr/bin/ssh', 'user...@ <javascript:>192.168.1.10', 'cd', 
> '/home/user', '&&', '/usr/bin/python', '/tmp/tmp.GdfVvq/deployed-rpyc.py']
>
> Exit code: 1
>
> Stderr:  | Traceback (most recent call last):
>
>          |   File "/tmp/tmp.GdfVvq/deployed-rpyc.py", line 24, in <module>
>
>          |     from rpyc.utils.server import ThreadedServer as ServerCls
>
>          | ImportError: No module named rpyc.utils.server
>
>
> This makes sense, as I had not installed it previously; but I was under 
> the impression that Zero - Deploy will copy the local (client’s) copy of 
> rpyc into the temporary directory created by plumbum, which must not have 
> happened.
>
> I tried running the commands again after I installed rpyc on the remote 
> server and everything worked very well, so I am convinced that there is an 
> issue with copying rpyc over.
>
> Any suggestions?
>

-- 

--- 
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/groups/opt_out.

Reply via email to