Re: Using Pyro over 2 networks

Irmen de Jong <[email protected]> Fri, 03 Oct 2014 23:17:21 +0200
Newsgroups gmane.comp.python.pyro
Message-ID <[email protected]>
On 3-10-2014 15:54, Richard wrote:
> In trying to do this, I' am sending 'myself' over, but I get an error:
> 
> Traceback (most recent call last):
>    File "/Users/richard/Desktop/MyPython/hops/hopper.py", line 110, in 
> <module>
>      flame.sendmodule("flame.stuff", modulesource)
>    File 
> "/Library/Python/2.7/site-packages/Pyro4-4.22-py2.7.egg/Pyro4/core.py", 
> line 160, in __call__
>      return self.__send(self.__name, args, kwargs)
>    File 
> "/Library/Python/2.7/site-packages/Pyro4-4.22-py2.7.egg/Pyro4/core.py", 
> line 318, in _pyroInvoke
>      raise data
> IndexError: list index out of range


Please find out where that error is coming from. I *think* it is an error raised from
your own code in the module that you are sending across via flame.
You should be able to discover this easily by looking in the pyro log on the server.


> When I send another .py module over, all works fine.
> I am using a flame server on the other side, and a small SQLite database 
> telling hopper.py the IP address of the next hop.
> Is there a limitation on what to send over? E.g. can it be a program or 
> should it be only functions or classes?

You can send a python module across. They can contain all sorts of things... As long as
it is pickleable.

> I can imagine that when sending over a program the initial code will not 
> get called?

I don't know what you are asking here, what is "the initial code"?


Irmen


------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk