Irmen de Jong | 26 Jun 23:19 2014
Picon

Pyro 4.26 released!


Hi,

Pyro 4.26 has just been released!

Get it from Pypi:  http://pypi.python.org/pypi/Pyro4/
Or straight from Github:  https://github.com/irmen/Pyro4
Documentation: http://pythonhosted.org/Pyro4/index.html

Overview of new stuff in this version:

introduced PICKLE_PROTOCOL_VERSION config item
fixed exception handling when dealing with different major Python versions. Using
serpent or json now also properly translates exception objects even if the major
Python version differ
because of the new way Pyro deals with serialized exceptions, the wire protocol
version was updated to 47. You?ll have to update all Pyro4 libraries to 4.26
name server prints a warning if a protocol error occurs (this helps to spot issues
such as serializer protocol mismatches)
more info in documentation about pickle and numpy
improved documentation index

Have fun!

Irmen de Jong
Irmen de Jong | 26 Jun 23:18 2014
Picon

Pyrolite 3.1 released (pyro 4.26 compatibility)


Hi,

I've released a new version (3.1) of Pyrolite, the native-Java and .Net library to
interface with Pyro and Python/pickle.

It got the wire protocol version bumped to that of the latest Pyro release (4.26).

Pyrolite can only speak Pyro wire protocol v47, which is used by Pyro 4.26 and
newer. This Pyrolite release can not be used with older Pyro versions.
Note that the Serpent serializer is used by default, and you will need to include
Serpent version 1.5 or newer in your project for that. You can configure Pyrolite to
use pickle instead though, in which case you don't have to include the Serpent library
in your project.

Get it at: https://github.com/irmen/Pyrolite
Binaries at: http://irmen.home.xs4all.nl/pyrolite/

Have fun,

Irmen de Jong
Plamen Dimitrov | 14 Jun 20:57 2014

Cannot return object copies (autoproxy off)

Hi Irmen,

First off let me say how amazing your Pyro4 is! Achieving such little 
modification of the existing code makes it possible to distribute many 
complex cases, the documentation is great and really informative, and 
the functionality is of course over the top of my expectations. Now 
about the problem I encountered which might be pretty straightforward 
but at least it didn't seem so from the documentation:

I followed the most basic example to register an object and according to 
the documentation if I turn off the autoproxy option (of course it would 
be better on, but I cannot modify the original code I am trying to 
distribute over the network), I should receive a copy of the remotely 
constructed object. However, all I get is

ProtocolError: unsupported serialized class: ...

which is not really true because I have already remotely accessed 
different instances of the same class (!). In a more illustrative example:

I want to share an instance of Dog where remotely calling its method 
bark(), I get back an instance of Sound. I have registered the Dog 
instance and when I call bark(), I get the above error. In a different 
case I have remotely called a method of Sound and had no troubles 
serializing the Sound instance and accessing it remotely. Do you have 
any ideas what am I doing wrong? In the case of AUTOPROXY=True I would 
expect the remotely generated Sound instance and without it I was hoping 
for at least a copy. However, I got the above error (I get the same 
error on far simpler classes with no methods at all like Exception 
subclasses).
(Continue reading)

hjxwho | 29 May 17:21 2014
Picon

Prevent a method from being called

Hello,
Is it possible there is a way to prevent an existing method from being called because this method is only avaliable to the server?
Thank you,
Klaus
------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
Pyro-core mailing list
Pyro-core@...
https://lists.sourceforge.net/lists/listinfo/pyro-core
hjxwho | 15 May 17:23 2014
Picon

NAT configuration

Hi all,
Does someone have tried to use Pyro4 under NAT? I use vituralbox to set up a server, and the Network setting is NAT. Also, i specific the port forwarding.
Then, in the code, I did this

daemon = Pyro4.Daemon(port=8888,nathost="140.182.27.137", natport=8889)

After this, 
I tried to call this remote on my host computer by using the uri provided by the server.
However, I received 

Pyro4.errors.ConnectionClosedError: receiving: not enough data 

It seems like the server did not receive any data from the client. I checked the port 8889, and it says it’s listening.
Is there any other configuration I need to do ?

Thank you,
Klaus
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
Pyro-core mailing list
Pyro-core@...
https://lists.sourceforge.net/lists/listinfo/pyro-core
hjxwho | 16 Apr 09:48 2014
Picon

[Error 111] connection refused

Hi all,
When I tried to test Pyro4 on two separated vitural machines, I got this error:

cannot connect: [Error 111] Connection Refused

My two machines are using the NAT Network. They can ping each other and I also tried a little socket demo to ensure they can talk to each other. Also, I closed both firewalls. 

Can someone give me some advice? I really appreciate that!

Dante
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Pyro-core mailing list
Pyro-core@...
https://lists.sourceforge.net/lists/listinfo/pyro-core
hjxwho | 15 Apr 04:48 2014
Picon

How to make my service public

Hi all,
I know this is a silly question but can someone tell how to make my service public?
I tried to make the name server public and did it in the following way:
1. use ifconfig to find the address
2. then, run the python -m Pyro4.naming -n 10.0.2.15

I tired to ping this server on another virtual machine, and it failed to locate the server.

Can anyone tell me what I should do to make it correct?
Thank you!
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Pyro-core mailing list
Pyro-core@...
https://lists.sourceforge.net/lists/listinfo/pyro-core
Irmen de Jong | 12 Apr 01:17 2014
Picon

Pyro 4.25 released!


Hi,

Pyro 4.25 has just been released!

Get it from Pypi:  http://pypi.python.org/pypi/Pyro4/
Or straight from Github:  https://github.com/irmen/Pyro4
Documentation: http://pythonhosted.org/Pyro4/index.html

Overview of new stuff in this version:

now also puts package name in serpent serialization data for custom class instances
(previously only the class name was used)
requires serpent 1.5 or newer (because of the feature above)
support for (Linux) abstract namespace AF_UNIX sockets (with a 0-byte at the start
of the name)
register_dict_to_class method added on SerializerBase, to be able to deserialize to
particular user defined classes
docs: mention that you may have to install serpent manually (most notably with
alternative Python implementations)
docs: mention the serialization hooks on SerializerBase
added ser_custom example that shows how to use the serialization hooks

Have fun!

Irmen de Jong
madhuri | 10 Mar 05:43 2014
Picon

High Availability of Pyro Servers

Hi All,

I have installed pyro on my machine and able to interact with remote objects
on different machine.

But I have a question regarding availability of Pyro servers. 
For eg. If I have multiple pyro servers(one running as master server at a
time and others as slave servers), is there any way in pyro to invoke slave
servers to run as master in case of any failures?

Thanks, in advance!!

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
Tom Hanson | 3 Mar 17:41 2014

Having trouble handling events

Hey everyone!

I'm trying to add Pyro4 events to my gobject MainLoop, but I'm having trouble with handling them.

This is some of some code that I've tried:

def start_pyro(self,device_id):
    """Sets up Pyro, sharing Slave, and starting the eventloop"""
    def handle_pyro(self, socket,*args):
      daemon.events(socket)
      return True
      
    slave = Slave()
    
    daemon=Pyro4.Daemon()
    ns=Pyro4.locateNS()
    uri=daemon.register(slave)
    ns.register("pisync.slave.%s" % device_id, uri)
    
    gobject.io_add_watch(daemon.sockets[0],gobject.IO_IN,handle_pyro)
    gobject.MainLoop().run()

It seems to run fine, but when I try to access the object remotely the remote device just hangs and the local device displays:

Traceback (most recent call last):
  File "modules/pyro_slave_new.py", line 83, in handle_pyro
    print daemon.events([socket])
  File "/usr/local/lib/python2.7/dist-packages/Pyro4/core.py", line 658, in events
    return self.transportServer.events(eventsockets)
  File "/usr/local/lib/python2.7/dist-packages/Pyro4/socketserver/threadpoolserver.py", line 133, in events
    assert self.sock in eventsockets
AssertionError

Could anyone point me to where I'm going wrong?

Thanks!
Tom Hanson
------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________
Pyro-core mailing list
Pyro-core@...
https://lists.sourceforge.net/lists/listinfo/pyro-core
Marcell Legeza | 24 Feb 22:11 2014
Picon

Stockmarket tutorial help

Hello!

I would like to ask for help regarding the stockmarket tutorial. I have a clean ubuntu installation in which i copy-pasted the code of the tutorial. I start the nameserver and the stockmarket cannot connect to it. The full error is here:

Traceback (most recent call last):
  File "/usr/local/lib/python3.3/dist-packages/Pyro4/naming.py", line 334, in locateNS
    proxy.ping()
  File "/usr/local/lib/python3.3/dist-packages/Pyro4/core.py", line 160, in __call__
    return self.__send(self.__name, args, kwargs)
  File "/usr/local/lib/python3.3/dist-packages/Pyro4/core.py", line 306, in _pyroInvoke
    msg = Message.recv(self._pyroConnection, [Pyro4.message.MSG_RESULT])
  File "/usr/local/lib/python3.3/dist-packages/Pyro4/message.py", line 160, in recv
    msg = cls.from_header(connection.recv(cls.header_size))
  File "/usr/local/lib/python3.3/dist-packages/Pyro4/socketutil.py", line 456, in recv
    return receiveData(self.sock, size)
  File "/usr/local/lib/python3.3/dist-packages/Pyro4/socketutil.py", line 193, in receiveData
    raise err
Pyro4.errors.ConnectionClosedError: receiving: not enough data

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "stockmarket.py", line 63, in <module>
    main()
  File "stockmarket.py", line 53, in main
    ns = Pyro4.locateNS()
  File "/usr/local/lib/python3.3/dist-packages/Pyro4/naming.py", line 340, in locateNS
    raise e
Pyro4.errors.NamingError: Failed to locate the nameserver
legezam <at> ubuntu:~/PycharmProjects/PyroTutorial$ python3 stockmarket.py 
Traceback (most recent call last):
  File "/usr/local/lib/python3.3/dist-packages/Pyro4/naming.py", line 334, in locateNS
    proxy.ping()
  File "/usr/local/lib/python3.3/dist-packages/Pyro4/core.py", line 160, in __call__
    return self.__send(self.__name, args, kwargs)
  File "/usr/local/lib/python3.3/dist-packages/Pyro4/core.py", line 306, in _pyroInvoke
    msg = Message.recv(self._pyroConnection, [Pyro4.message.MSG_RESULT])
  File "/usr/local/lib/python3.3/dist-packages/Pyro4/message.py", line 160, in recv
    msg = cls.from_header(connection.recv(cls.header_size))
  File "/usr/local/lib/python3.3/dist-packages/Pyro4/socketutil.py", line 456, in recv
    return receiveData(self.sock, size)
  File "/usr/local/lib/python3.3/dist-packages/Pyro4/socketutil.py", line 193, in receiveData
    raise err
Pyro4.errors.ConnectionClosedError: receiving: not enough data

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "stockmarket.py", line 63, in <module>
    main()
  File "stockmarket.py", line 53, in main
    ns = Pyro4.locateNS()
  File "/usr/local/lib/python3.3/dist-packages/Pyro4/naming.py", line 340, in locateNS
    raise e
Pyro4.errors.NamingError: Failed to locate the nameserver

I have tried it with ufw disabled and enabled with corresponding rules, and still no change. The interesting part is that the warehouse example (with servesimple) works exactly as it is descripted in the tutorial. (with nameserver turned on)
The stockmarket stucks at the line: locateNS().

Environment: Ubuntu 64 desktop in VMWare workstation

I am really new to this, please help me!

Thank You in advance!

Regards,
Marcell Legeza
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
Pyro-core mailing list
Pyro-core@...
https://lists.sourceforge.net/lists/listinfo/pyro-core

Gmane