Home > Configuration, Linux, Python, Ubuntu, Uncategorized > openerp-server 5.0 and Python 2.7

openerp-server 5.0 and Python 2.7

Ubuntu Inside

Image by Kordite via Flickr

After upgrading Ubuntu to 11.04 I found the nasty surprise that openerp-server 5.0 could not create a new database because it threw the following error message:

ValueError: opcode JUMP_IF_FALSE_OR_POP not allowed (u’auto_picking and test_auto_picking()’)

After doing some quick research with Google, I found the following bug that is already fixed in openerp-server v6:

https://bugs.launchpad.net/openobject-server/+bug/673773

Since upgrading to openerp v6 at this time is not an option for me, I only needed to make a slight change to make openerp-server work with Python 2.6. I already had python 2.6 installed in my Ubuntu system, which I could check with the following command:

gustavo@gustavo-laptop:/usr/bin$ python2.6
Python 2.6.6 (r266:84292, Mar 25 2011, 19:36:32)
[GCC 4.5.2] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
>>>

Then I changed the openerp-server command at my /usr/local/bin directory. I only needed to change the

exec /usr/bin/python ./openerp-server.py $@

line to

exec /usr/bin/python2.6 ./openerp-server.py $@

And that is all I needed to do to get my system back to work

Cheers!

About these ads
  1. edroshz
    June 11, 2011 at 10:59 pm

    Very useful, thanks

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: