Re: locateNS() hangs when running stockquotes example in tutorial

Irmen de Jong <[email protected]> Wed, 07 Jan 2015 01:21:48 +0100
Newsgroups gmane.comp.python.pyro
Message-ID <[email protected]>
On 7-1-2015 0:06, Kenneth Martin wrote:
> Disclaimer, I'm brand new to Pyro4 and may be doing something stupid.

Maybe, maybe not! Welcome either way :)

> Details: running Debian Linux beaglebone 3.8.13-bone47 #1 SMP Fri Apr 11 01:36:09 UTC
> 2014 armv7l GNU/Linux
> on a Beaglebone Black C.
> Pyro4: 4.31
> 
> I set the environment variable per tutorial:
> export PYRO_SERIALIZERS_ACCEPTED=pickle, but I may have done this after running >pyro4-ns &

Yes, setting it after starting the name server won't do much. The name server needs to
pick it up when it is started in order to use the correct mode.
You'll have to make sure that the environment variables have the correct value before
starting the name server (or any Pyro server, for that matter).

I'll clarify the steps in the tutorial chapter a bit more to make this perfectly clear.


> When running the stockquote tutorial phase 3, I determined using winpdb that
> aggregator.py was hanging on line 34
>     ns = Pyro4.locateNS()

Hm, shouldn't hang. Will investigate a bit what happens in the scenario you're describing.


> Summary, there may be a problem with the tutorial in 4.31 in an out of the box set-up.

I don't agree: it works fine as long as the Ns is started after setting the environment
variable ;)

> Also, maybe some checks for consistency on serializers might help.

What do you mean by this exactly?

> Not sure if this helps, but for new users having the tutorials
> work is so critical, I thought it might be worth taking the time, as Pyro4 looks like a
> great module; Irmen, much appreciated.

Thanks for the feedback!

Irmen


------------------------------------------------------------------------------
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net