← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 630333] Re: OpenERP 5.0.14 not working on Python 2.4 (Centos 5.5)

 

Indeed, a few things need to be fixed to restore compatibility with Python 2.4 in 5.0, especially after backporting safe_eval.
BTW I don't think we need literal_eval at all in 5.0, so we can simply drop it and avoid the ast deps.

** Changed in: openobject-server
     Assignee: (unassigned) => OpenERP's Framework R&D (openerp-dev-framework)

-- 
OpenERP 5.0.14 not working on Python 2.4 (Centos 5.5)
https://bugs.launchpad.net/bugs/630333
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.

Status in OpenObject Server: Confirmed

Bug description:
Hi,

I just tried installation of OpenERP on CentOS 5.5 (which is python
2.4-based), following the instructions from here (spanish):

http://civicom.eu/ERP/OpenERP/OpenERP-Instalacion.htm

I had no problem at all installing anything from there, but when I tried to
execute "openerp-server -s" (to bootstrap configuration) as user
"openerp" (created previously), I got the following error:

---------------
[root@maq-openerp ~]# openerp-server -s
Traceback (most recent call last):
  File "./openerp-server.py", line 48, in ?
    import netsvc
  File "/usr/lib/python2.4/site-packages/openerp-server/netsvc.py",
line 200, in ?
    import tools
  File
"/usr/lib/python2.4/site-packages/openerp-server/tools/__init__.py",
line 25, in ?
    from misc import *
  File
"/usr/lib/python2.4/site-packages/openerp-server/tools/misc.py", line
909
    finally:
          ^
SyntaxError: invalid syntax
[root@maq-openerp ~]# su - openerp
[openerp@maq-openerp ~]$ openerp-server -s
Traceback (most recent call last):
  File "./openerp-server.py", line 48, in ?
    import netsvc
  File "/usr/lib/python2.4/site-packages/openerp-server/netsvc.py",
line 200, in ?
    import tools
  File
"/usr/lib/python2.4/site-packages/openerp-server/tools/__init__.py",
line 25, in ?
    from misc import *
  File
"/usr/lib/python2.4/site-packages/openerp-server/tools/misc.py", line
909
    finally:
          ^
SyntaxError: invalid syntax

---------------

As can be seen, it happens executing openerp-server as root or as a
simple dedicated "openerp" user.

Going to the troubled "misc.py", line 909, there's a "finally" clause
there which is within the same "try ... except ..." clause. But this
is NOT a python 2.4 feature, but from python 2.5 onwards, as it's explained e.g.
here:

http://www.devx.com/webdev/Article/33005/1763/page/2

Excerpt: "...Prior to 2.5 you couldn't have both an except clause and
a finally clause for the same try block..." -- Which is exactly the
problem here, IMHO.

So I guess OpenERP 5.0.14 is NOT compatible with python 2.4 and thus
with CentOS 5, RHEL 5, etc.

Is this intended, or is it a regression that will be fixed?

I'm an advanced Linux CentOS and server admin, and I'm also
evaluating OpenERP so maybe I can help with more testing.

BTW, I've done quite a lot of web research on this and seemingly no
one has stepped into this problem...??? yet...?

Thanks in advance.
Jorge