Showing posts with label server. Show all posts
Showing posts with label server. Show all posts

16 April 2009

Running OpenERP on Ubuntu 9.04

The OpenERP server has some compatibility problems because it works only with python 2.5 and the deprecated PyXML library. Ubuntu 9.04 has python 2.6 as default and a broken PyXML (python-xml) package. Depedencies on the deprecated PyXML should be removed from OpenERP, anyway. The following instructions require more than basic level linux skills.
  1. Solve the python 2.5 problem: Make sure you have python2.5 installed. sudo apt-get install python2.5 Then you have to be sure that the server starts with python2.5, not python (that's the 2.6 version). So if you have an openerp-server script, change the 'exec /usr/bin/python ./openerp-server.py' to 'exec /usr/bin/python2.5 ./openerp-server.py'
  2. Solve python-xml. A file is missing from the python-xml package, boolean.so .That has to be compiled from source and copied to /usr/lib/python2.5/site-packages/oldxml/_xmlplus/utils . The instructions for compiling would be too long to describe here; If you write me here or on the irc channel, I'll send you my already compiled version or describe the necessary steps in detail.
p.s. I've just created a blueprint for python 2.6 support.

Update: Finally the deprecated libs were removed, the latest bzr 5.0 and trunk work on new Ubuntus.

27 January 2009

Debugging and profiling

There are two recently added tools that can help OpenObject developers, debug() and @profile.
If you insert debug(variable) somewhere in your code it prints the variable name and contents to the server console. To use it, you have to 'from tools.misc import debug' and start the server with '--log-level=debug'.
Profiling measures method and function execution times. Look it up in the Python Standard Library. 'profile' should be used as a function/method decorator but unfortunately I don't know how to make it work yet...