irmen / Pyro4

Pyro 4.x - Python remote objects
http://pyro4.readthedocs.io/
MIT License
715 stars 83 forks source link

serializer 'serpent' is unknown or not available #226

Closed nabiladoui closed 4 years ago

nabiladoui commented 4 years ago

After installing Pyro4 using pip install Pyro4, trying to run the name server (or a Pyro daemon) throws this exception :

python -m Pyro4.naming Traceback (most recent call last): File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main "main", fname, loader, pkg_name) File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/usr/lib/python2.7/site-packages/Pyro4/naming.py", line 568, in main() File "/usr/lib/python2.7/site-packages/Pyro4/naming.py", line 564, in main hmac=options.key) File "/usr/lib/python2.7/site-packages/Pyro4/naming.py", line 465, in startNSloop daemon = NameServerDaemon(host, port, unixsocket, nathost=nathost, natport=natport, storage=storage) File "/usr/lib/python2.7/site-packages/Pyro4/naming.py", line 269, in init super(NameServerDaemon, self).init(host, port, unixsocket, nathost=nathost, natport=natport) File "/usr/lib/python2.7/site-packages/Pyro4/core.py", line 1158, in init self.serializer_ids = {util.get_serializer(ser_name).serializer_id for ser_name in config.SERIALIZERS_ACCEPTED} File "/usr/lib/python2.7/site-packages/Pyro4/core.py", line 1158, in self.serializer_ids = {util.get_serializer(ser_name).serializer_id for ser_name in config.SERIALIZERS_ACCEPTED} File "/usr/lib/python2.7/site-packages/Pyro4/util.py", line 773, in get_serializer raise errors.SerializeError("serializer '%s' is unknown or not available" % name) Pyro4.errors.SerializeError: serializer 'serpent' is unknown or not available

serpent is installed, version 1.30, with Pyro : pip show serpent Name: serpent Version: 1.30 Summary: Serialization based on ast.literal_eval Home-page: https://github.com/irmen/Serpent

Uninstalling this version and installing 1.28 fixed the issue

irmen commented 4 years ago

Serpent 1.30 is no longer supported on Python 2.7 (which is EOL - you really should upgrade)

It's not possible to import serpent 1.30 successfully using python 2.7, and Pyro4 concludes that serpent isn't available. As serpent's readme says, you must use a version prior to 1.30 if you're still on Python 2.7

I'll make serpent in the next version, exit with an error message on installation if it detects an obsolete python version. The next Pyro4 version will be smarter about what serpent version to install as well