openerp-server depends on python-xml and is therefore uninstallable ATM

Bug #337759 reported by Z
84
This bug affects 7 people
Affects Status Importance Assigned to Milestone
OpenERP
Fix Released
Undecided
Unassigned
Python
Invalid
Unknown
lxml
Invalid
Undecided
Unassigned
lxml (Ubuntu)
Invalid
Undecided
Unassigned
Declined for Karmic by Matthias Klose
openerp-server (Ubuntu)
Fix Released
Undecided
Unassigned
Declined for Karmic by Matthias Klose
python-xml (Ubuntu)
Invalid
Undecided
Unassigned
Declined for Karmic by Matthias Klose

Bug Description

Binary package hint: openerp-server

1) The release of Ubuntu you are using, via 'lsb_release -rd' or System -> About Ubuntu.

Description: Ubuntu jaunty (development branch)
Release: 9.04

2) The version of the package you are using, via 'apt-cache policy packagename' or by checking in Synaptic.

openerp-server:
  Installiert: (keine)
  Kandidat: 5.0.0-3-1ubuntu2
  Versions-Tabelle:
     5.0.0-3-1ubuntu2 0
        500 file: jaunty/universe Packages
        500 http://de.archive.ubuntu.com jaunty/universe Packages

3) What you expected to happen

Installation of the package ;)

4) What happened instead

Dependency errors :)

Details:
=====
openerp-server depends/build-depends on python-xml, which is fine. However, python-xml depends on python < 2.6 which isn't the default anymore in jaunty. This leads to an uninstallable package.

I *suspect* the dependency on python-xml isn't needed anyway, since openerp's documentation states dependencies on:
        * psycopg2
        * reportlab
        * pychart
        * pydot
        * mxdatetime
        * xml, lxml and libxslt1
        * tz (timezone library)
        * PIL: Python Imaging Library (required for reportlab)
        * vobject: iCalendar and VCards parsing
however, python-xml provides:
   * XML parsers: Pyexpat (Jack Jansen), xmlproc (Lars Marius
     Garshol), sgmlop (Fredrik Lundh).
   * SAX interface (Lars Marius Garshol)
   * minidom DOM implementation (Paul Prescod, others)
   * 4DOM and 4XPath from Fourthought (Uche Ogbuji, Mike Olson)
   * Schema implementations: TREX (James Tauber)
   * Various utility modules and functions (various people)

(And openerp's ubuntu installation guide may state old package dependecies for python 2.4??)

I think python-xml shouldn't be used anymore (it isn't maintained??!), at least I found this:
https://bugs.launchpad.net/ubuntu/+source/python-xml/+bug/336631/comments/1

To verify my suspicions i tried building openerp-server without dependencies on python-xml.
This failed, but not because of dependency errors.
The build process fails because setup.py copies the files to
  $(CURDIR)/debian/openerp-server/usr/local/...
and debian/rules expects
  $(CURDIR)/debian/openerp-server/usr/...

The error message was:
# Adjusting program location
sed -i -e 's|cd .*python.*/site-packages|cd /usr/lib|' debian/openerp-server/usr/bin/openerp-server
sed: kann debian/openerp-server/usr/bin/openerp-server nicht lesen: No such file or directory

I'm guessing this has something to do with the python 2.6 changes outlined here:
https://wiki.ubuntu.com/Python2.6And3.0
but I have no idea what to look for.

I'm stuck now, please advise.

Related branches

Revision history for this message
Z (zwahri) wrote :

The package python-xml was just updated in jaunty, so openerp-server installs now.

Revision history for this message
Z (zwahri) wrote :

Heh, after installing cleanly it still doesn't run:

1.)
The README.Debian states the startup script is located in
     /usr/sbin/openerp-server
while it's in
    /usr/bin/openerp-server

2.) Seems like python-xml is really needed:

#su - postgres -c "/usr/bin/openerp-server --init=all --config=/etc/openerp-server.conf --stop-after-init"
ERROR: Import xpath module
ERROR: Try to install the old python-xml package

It's installed obviously, since python-xml is a dependency.

Revision history for this message
Z (zwahri) wrote :

I've tried looking around in the python code and found python-xml is broken:
Openerp tries to initialize xml.dom and xml.xpath.
Since both initializations are done in the same try ... catch block, only one error message is given, but xml.dom loads fine while xml.xpath dies.

This may be reproduced manually:
$ python
Python 2.6.1+ (r261:67515, Mar 2 2009, 13:11:28)
[GCC 4.3.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import xml
>>> import xml.dom
>>> import xml.xpath
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/dist-packages/_xmlplus/xpath/__init__.py", line 105, in <module>
    import Context
  File "/usr/lib/python2.6/dist-packages/_xmlplus/xpath/Context.py", line 15, in <module>
    import CoreFunctions
  File "/usr/lib/python2.6/dist-packages/_xmlplus/xpath/CoreFunctions.py", line 20, in <module>
    from xml.xpath import Util, Conversions
  File "/usr/lib/python2.6/dist-packages/_xmlplus/xpath/Conversions.py", line 22, in <module>
    from xml.utils import boolean
ImportError: cannot import name boolean

So I'm guessing even though python-xml got upgraded/rebuilt for python-2.6 it's not working correctly.

Too bad openerp seems to really need xpath from python-xml...

Revision history for this message
Alan Bell (alanbell) wrote :

if you copy boolean.so from
/usr/lib/python2.6/dist-packages/oldxml/_xmlplus/utils/boolean.so
to
/usr/lib/python2.6/dist-packages/_xmlplus/utils/boolean.so
then you can do the imports at least.

Revision history for this message
Alan Bell (alanbell) wrote :

and the server starts. I had to run
sudo su postgres
then as the postgres user
openerp-server
starting the init script didn't seem to work, however It does seem to be unrelated to this bug.
Creating a database caused loads of errors and a crash, but again, unrelated to this bug I think.

Revision history for this message
Alan Bell (alanbell) wrote :

after moving the boolean.so file I am hitting bug http:bugs.launchpad.net/openobject-server/+bug322964 where the conclusion appears to be that Python 2.6 is not supported.

Revision history for this message
Z (zwahri) wrote :

That's a shame, since Jaunty contains the first ubuntu package of openerp-server ever. Seems like this is a non-issue on debian, they're still on python 2.5.
I was happy about the package because I don't like to install things outside the package management - saves a lot of trouble later on (I tend to forget manually installed packages ;) ).
I guess I'll try a VM running debian instead of ubuntu.

Revision history for this message
Freerk Kalsbeek (Mindswitch BV) (f-kalsbeek) wrote :

I see two options to fix it.
1. File a bug for python-xml
2. Remove dependency for python-xml in OpenERP.

My first hunch is that it should be fixed in python-xml. It does not look like an OpenERP error.

Revision history for this message
Alan Bell (alanbell) wrote :

hmm, launchpad says python-xml doesn't use launchpad for bug tracking, sourceforge http://sourceforge.net/project/showfiles.php?group_id=6473&package_id=6541 appears to be unmaintained and unchanged version 0.8.4 since 2004. The Ubuntu intrepid version is 0.8.4-10.1ubuntu-1 and Jaunty is 0.8.4-10.1ubuntu-2. I will do some checks to compare the Ubuntu package and the sourceforge upstream to figure out where the bug is.

Revision history for this message
Alan Bell (alanbell) wrote :

was about to report a bug in python-xml, but then saw Z already has https://bugs.launchpad.net/ubuntu/+source/python-xml/+bug/343242/

Revision history for this message
Davide Corio (enlightx-deactivatedaccount) wrote :

/usr/lib/python2.5/site-packages/_xmlplus/utils/boolean.so
/usr/lib/python2.5/site-packages/oldxml/_xmlplus/utils/boolean.so

these files are missing in python-xml package

but:

dpkg -L python-xml | grep boolean

/usr/lib/python2.5/site-packages/_xmlplus/utils/boolean.so
/usr/lib/python2.6/dist-packages/oldxml/_xmlplus/utils/boolean.so

it seems to be a python-xml issue

Revision history for this message
Bernard Sauterel Bekauri (bernard-sauterel) wrote :

I had same issue with python 2.5 / mac os 10.5.6 / openerp 5.0.0 .

I played with adding this line just before the xpath import "from xml.utils import boolean" and with doing an "export PY_USE_XMLPLUS=YES" before starting openerp. It worked then.

Maybe it can help in python 2.6 too. Can you let me know ?

Revision history for this message
Z (zwahri) wrote :

@Bernard Sauterel Bekauri :
That didn't help, since it is used even without the export I think.

@All:
I found out something interesting:

The directory
  /usr/lib/python2.6/dist-packages/oldxml/_xmlplus/utils
on my box contains the missing boolean.so, so i created a symlink in
  /usr/lib/python2.6/dist-packages/_xmlplus/utils

This resulted in:
sudo su - postgres -c "/usr/bin/openerp-server --init=all --config=/etc/openerp-server.conf --stop-after-init"
[2009-03-31 11:28:00,589] INFO:server:version - 5.0.0
[2009-03-31 11:28:00,597] INFO:server:addons_path - /usr/lib/openerp-server/addons
[2009-03-31 11:28:00,598] INFO:server:database hostname - localhost
[2009-03-31 11:28:00,599] INFO:server:database port - 5432
[2009-03-31 11:28:00,600] INFO:server:database user - postgres
[2009-03-31 11:28:00,601] INFO:objects:initialising distributed objects services
/usr/lib/openerp-server/addons/__init__.py:26: DeprecationWarning: the sets module is deprecated
  from sets import Set

I haven't checked any further, but it seems at least to solve the python-xml issue.
I have absolutely no idea why there are 2 nearly identical copys of "oldxml" on this box, I'll check that out later. (Purging openerp-server and all it's dependencies including python-xml

I'll update the python-xml bug with further progress:
https://bugs.launchpad.net/ubuntu/+source/python-xml/+bug/343242/

Revision history for this message
Jonathan Harker (jonathanharker) wrote :

Just to confirm - on jaunty I had the following errors trying to run openerp-server:

ERROR: Import xpath module
ERROR: Try to install the old python-xml package

Using bernard-sauterel's suggested

export PY_USE_XMLPLUS=YES

changed the errors to

[2009-04-07 14:48:23,126] INFO:server:version - 5.0.0
[2009-04-07 14:48:23,129] INFO:server:addons_path - /usr/lib/openerp-server/addons
[2009-04-07 14:48:23,129] INFO:server:database hostname - localhost
[2009-04-07 14:48:23,129] INFO:server:database port - 5432
[2009-04-07 14:48:23,130] INFO:server:database user - xxxx
[2009-04-07 14:48:23,130] INFO:objects:initialising distributed objects services
/usr/lib/python2.6/sets.py:85: DeprecationWarning: functions overriding warnings.showwarning() must support the 'line' argument
  stacklevel=2)
/usr/lib/openerp-server/addons/__init__.py:26: DeprecationWarning: the sets module is deprecated
  from sets import Set

Revision history for this message
Jonathan Harker (jonathanharker) wrote :

I have a patch which fixes this second error - just a check for the deprecated sets module for versions of python < 2.4

Revision history for this message
Jonathan Harker (jonathanharker) wrote :

On jaunty this patch fixes the import xpath module error - by tweaking /usr/lib/openerp-server with bernard-sauterel's env fix above to tell the python interpreter (2.6 in jaunty) to use the older xmlplus libs instead.

Revision history for this message
Jonathan Harker (jonathanharker) wrote :

Of course all of this assumes a
sudo ln -s /usr/lib/python2.6/dist-packages/oldxml/_xmlplus/utils/boolean.so /usr/lib/python2.6/dist-packages/_xmlplus/utils/boolean.so

:-/

Arno Peters (awpeters)
Changed in openerp-server (Ubuntu):
status: New → Confirmed
Revision history for this message
ub121 (ubs121) wrote :

sudo cp /usr/lib/python2.6/dist-packages/oldxml/_xmlplus/utils/boolean.so /usr/lib/python2.5/site-packages/oldxml/_xmlplus/utils

Revision history for this message
Schmirrwurst (schmirrwurst) wrote :

Are the two submitted patch also updated as patch with "this attachment is a patch" ?
If we wan't this to be corrected, we should then add the group "ubuntu-universe-sponsors", to have some motu package an update, or am I wrong ?

Revision history for this message
Hilario J. Montoliu (hjmf) (hmontoliu) wrote :

I've tested the suggestion and patches from Jonathan Harker in my Ubuntu 9.04.

The server starts but I get a bunch of problems (ie bug #322964)

The only way I've managed to get it work in Ubuntu 9.04 is starting the server with python2.5 and link:

ln -s /usr/lib/python2.6/dist-packages/oldxml/_xmlplus/utils/boolean.so /usr/lib/python2.5/site-packages/oldxml/_xmlplus/utils/

Revision history for this message
Schmirrwurst (schmirrwurst) wrote :

In that case we should update the dependencies from the openerp-server package ?

Revision history for this message
Schmirrwurst (schmirrwurst) wrote :

How did you indicate the server to use python2.5 ?

Revision history for this message
Schmirrwurst (schmirrwurst) wrote :

It is working by changing the following line in /usr/bin/openerp-server :
from
exec /usr/bin/python2.5 ./openerp-server.py
to
exec /usr/bin/python ./openerp-server.py

and doing the ln -s like Hilario suggested.
In we could change this line in the package, and add the ln -s in the postinst file from the package, and submit an update ?

Revision history for this message
Jerome Warnier (jwarnier) wrote : Re: [Bug 337759] Re: openerp-server depends on python-xml and is therefore uninstallable ATM

Schmirrwurst wrote:
> It is working by changing the following line in /usr/bin/openerp-server :
> from
> exec /usr/bin/python2.5 ./openerp-server.py
> to
> exec /usr/bin/python ./openerp-server.py
>
> and doing the ln -s like Hilario suggested.
> In we could change this line in the package, and add the ln -s in the postinst file from the package, and submit an update ?
>
Do not forget the hard dependency on python2.5.

Revision history for this message
jeroen poort (jpoort) wrote :

got it working with the latest bazaar checkout and a manual install of python-xml..

sudo apt-get install python2.5 python2.5-dev
download the python-xml from http://pyxml.sourceforge.net/topics/download.html or from sourceforge
in a shell extract the tar, and install python-xml ; python2.5 setup.py install
then run python2.5 ./openerp-server.py from the openerp server dir

ps: i tried " sudo cp /usr/lib/python2.6/dist-packages/oldxml/_xmlplus/utils/boolean.so /usr/lib/python2.5/site-packages/oldxml/_xmlplus/utils and other suggestions mentioned in the previous posts" before, but i wonder if that helped since it only worked after installing python xml by hand..

cheers

Revision history for this message
Schmirrwurst (schmirrwurst) wrote :

I've just saw that for me it works with using python2.5 binary instead of 2.6, and making the ln-s to 2.6 as suggested above... but I'm asking if it is needed, as by me all other dependencies mentioned in the deb, are not installed for 2.5, so maybe installing all those dependencies for 2.5 would prevent for making a ln -s ?
Could you test it ?
python2.5, python2.5-lxml, python2.5-xml, python2.5-libxslt1, python2.5-psycopg2, python2.5-reportlab, python2.5-pychart, python2.5-pydot, python2.5-tz

Revision history for this message
Schmirrwurst (schmirrwurst) wrote :

forget it, it doesn't work, when doing a dpkg -l python2.5 I'm viewing them, but they cannot be installed, it may be a dummy package...

Revision history for this message
Schmirrwurst (schmirrwurst) wrote :

  * Change python dependencie from python (2.6) to python2.5
  * Added softlink for boolean.so in python2.5 pointing on python2.6
  * Added USER=openerp in init script
  * Changed log file for server from openerp.log to openerp-server.log

Revision history for this message
Schmirrwurst (schmirrwurst) wrote :

Still some problems with my package...
I've corrected some of them, but one remains, I try to add the link in the openerp-server.links file in debian directory, but at building time, I get following error :

ln: target `debian/openerp-server/usr/lib/python2.5/site-packages/oldxml/_xmlplus/utils/' is not a directory: No such file or directory
dh_link: command returned error code 256
make: *** [binary-indep] Error 1

Does anybody know which package belongs xmlplus/utils/ ? maybe I'm missing a dependency ?

Revision history for this message
Frans van Berckel (fberckel) wrote :

But if I am well, /usr/lib/python2.5/site-packages/_xmlplus/utils/boolean.so is in python-xml. Do you really need a ln ?

http://packages.ubuntu.com/jaunty/python-xml

Changed in python:
status: Unknown → New
Revision history for this message
Schmirrwurst (schmirrwurst) wrote :

Frans in fact the package seems to have the file in the propoer location, but don't install it... see if you have it at the right place... you can report here : https://bugs.launchpad.net/ubuntu/+source/python-xml/+bug/343242/

Revision history for this message
Jordi Esteve (www.zikzakmedia.com) (jesteve-zikzakmedia) wrote :

I think there are missing some important parameters in server configuration file /etc/openerp-server.conf installed by openerp-server ubuntu package like, for example:

netport = 8070
admin_passwd = admin

This is an example of, maybe, all parameters in a configuration file for openerp server:

[options]
port = 8069
netport = 8070
xmlrpc = True
netrpc = True
admin_passwd = admin
db_host = False
db_port = False
db_name = False
db_user = openerp
db_password = openerp_password
db_maxconn = 64
smtp_server = localhost
smtp_port = 25
smtp_user = False
smtp_password = False
email_from = False
without_demo = False
verbose = False
demo = {}
reportgz = False
netinterface =
upgrade = False
secure = False
price_accuracy = 2
import_partial =
soap = False
pidfile = False
debug_mode = False
interface =
logfile = False
pg_path = None
translate_modules = ['all']
stop_after_init = False
assert_exit_level = 30
root_path = /openerp-server-path/bin
addons_path = /openerp-server-path/bin/addons

Revision history for this message
Schmirrwurst (schmirrwurst) wrote :

I've update a package to make it works... by me everything seems alright now, except the pid file, that can't be written by the script, maybe because the init script is using chuid=openerp, and openerp is not allowed to write there...
Can somebody tell me what is the nice way to correct this ??
For now, creating the pid file manually and changing the rights to 777 enable the server to work...

Now the server is starting, without python errors, and you don't need to create the database like mentionned on the readme : I've removed the dbname initialisation in the config file, so the server start without db, but with dbuser , and when you connect with the client, it tells you to create one, and creating from the client works fine !

Explanation from what I've did :
  * patched setup.py to force python2.5
changed the code from setup file, to write python2.5 instead of python in /usr/bin/openerp-server like mentionned above

  * changed dependency from python2.6 to 2.5

  * initialising variable USER in init script : the variable was use for chuid in the init script, but the variable was not initialised

  * added link for boolean.so in python-xml until lp bug #343242 is fixed

  * removed dbname initialisation in conf file to enable the server to start
since the server can start without database, and the client can create it...

  * changed log file in config from openerp.log to openerp-server.log
since I believe it is confusing when using the client and server on the same machine, and it's better to have the same name as the binary...

The deb file can be found on my ppa :
deb http://ppa.launchpad.net/schmirrwurst/ppa/ubuntu jaunty main

in ppa it is ubuntu7 because lp doesn't allowed to resent package... I had to increase the version, but its the same

Help solving this pid issue is welcome !

Revision history for this message
Schmirrwurst (schmirrwurst) wrote :

OK, I've also found something out about the pid problem !!!
In fact it seems that the init script is managing the pid file, and the application also... It also the reason why the server often complains about missing pid file when trying to stop it or restart...

The only this is to uncomment the initialisation from the pid file variable in the configuration file /etc/openerp-server.conf !

I'll try to submit a new patch later...

Revision history for this message
Schmirrwurst (schmirrwurst) wrote :

openerp-server (5.0.0-3-1ubuntu3) jaunty; urgency=low

  * patched setup.py to force python2.5 (Bug #337759)
  * changed dependency from python2.6 to 2.5 (Bug #337759)
  * initialising variable USER in init script (Bug #327998)
  * added link for boolean.so in python-xml until lp bug #343242 is fixed (Bug #337759)
  * removed dbname initialisation in conf file to enable the server to start (Bug #327998)
  * changed log file in config from openerp.log to openerp-server.log
  * removed comment in postinst script : no more need of installing db from command line
  * changed pidfile setting from config file that conflicts with init script (Bug #362132)

I've corrected the pid file, in fact it was already reported... see below.

available from my ppa under 5.0.0-3-1ubuntu9 (9 always because lp versioning limitation)

Changed in python:
status: New → Invalid
Revision history for this message
Schmirrwurst (schmirrwurst) wrote :

I've found out the following in openerp-server.py
# ubuntu 8.04 has obsoleted `pyxml` package and installs here.
# the path needs to be updated before any `import xml`
# TODO: remove PyXML dependencies, use lxml instead.
#----------------------------------------------------------
_oldxml = '/usr/lib/python%s/site-packages/oldxml' % sys.version[:3]
if os.path.exists(_oldxml):
    sys.path.append(_oldxml)

According to this, lxml is to use instead of pyxml ??
But I could not found boolean.so in lxml ??

Revision history for this message
scoder (scoder) wrote :

this doesn't affect lxml at all

Changed in lxml:
status: New → Invalid
Changed in lxml (Ubuntu):
status: New → Invalid
Revision history for this message
Laurent Bigonville (bigon) wrote :

openerp-server (5.1.0) is available in debian, it's maybe intresting to give it a try

Revision history for this message
Frans van Berckel (fberckel) wrote :

You are pointing the 5.1.0 relaese, but that one still need the xml package ...

Dependency analysis (including build-depends; i386 only):

    * info: openerp-server depends on adduser (ok, testing has version 3.110)
    * info: openerp-server depends on debhelper >= 7 (ok, testing has version 7.2.14)
    * info: openerp-server depends on python (ok, testing has version 2.5.4-2)
    * info: openerp-server depends on python-dev (ok, testing has version 2.5.4-2)
    * info: openerp-server depends on python-libxslt1 (ok, testing has version 1.1.24-2)
    * info: openerp-server depends on python-lxml (ok, testing has version 2.1.5-1)
    * info: openerp-server depends on python-psycopg2 (ok, testing has version 2.0.9-5)
    * info: openerp-server depends on python-pychart (ok, testing has version 1.39-7)
    * info: openerp-server depends on python-pydot (ok, testing has version 1.0.2-1)
    * info: openerp-server depends on python-reportlab (ok, testing has version 2.2-2)
    * info: openerp-server depends on python-tz (ok, testing has version 2009d-1)
    * info: openerp-server depends on python-xml (ok, testing has version 0.8.4-10.1)
    * info: openerp-server depends on quilt (ok, testing has version 0.46-7)

Seeing in bug #343242 xml is removed from as obsolete and broken.

Revision history for this message
Mayank Goel (mac-goel) wrote :

Change python dependencie from python (2.6) to python2.5 b'coz OpenErp supports Python-2.5 and it,s compatible with Ubuntu 8.04 version.
So, you can try installing OpenErp on Hardy Heron.

Revision history for this message
Schmirrwurst (schmirrwurst) wrote :

Since 8.04, there are already two new releases out (almost 3) and I don't believe there will be a lot of people that will install 8.04 to use openerp, whereas 9.04 is out...

I've already submitted a fix for the package to work with jaunty, but because the ubuntu folk is always reacting so slow... now there is a new debian release, and I don't have the time to check what from the needed changes are in the new debian package or not, and submit a new fix for nothing... maybe someone else want...

Revision history for this message
Sebastien Bacher (seb128) wrote :

There is no debdiff to sponsor there, should the sponsor team be subscribed? Could you also send the bug and change to debian so versions can stay in sync too

Revision history for this message
mchevallier (marc-chevallier) wrote :

Hi,

I found a description of the workarround already described upper that enables beginner as I am to make the needed changes to let OpenERP work with Python 2.5:

Troubles with Python releases: Python 2.6 is not yet supported by OpenERP 5.0, but it is the default Python release on Ubuntu 9.0.4. We need to launch OpenERP 5.0 with Python 2.5 or earlier. There’s also a problem with python-xml package in Ubuntu so we will reinstall it.

Python 2.5 setting up:

    $ sudo apt-get install python2.5 python2.5-dev python-profiler

Reinstall python-xml:

    $ wget http://freefr.dl.sourceforge.net/sourceforge/pyxml/PyXML-0.8.4.tar.gz

    $ tar xvzf PyXML-0.8.4.tar.gz

    $ cd PyXML-0.8.4/

    $ sudo python2.5 setup.py install

Make the following symbolic link:

    $ sudo ln -s /usr/lib/python2.6/dist-packages/oldxml/_xmlplus/utils/boolean.so /usr/lib/python2.5/site-packages/oldxml/_xmlplus/utils/

Force openerp-server to be launched with Python2.5:

    $ cd /usr/bin/

    $ sudo cp openerp-server openerp-server.ORIG

    $ sudo vi openerp-server

Replace the following line:

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

with

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

We can now restart openerp-server:

    $ sudo /etc/init.d/openerp-server restart

    Restarting openerp-server: openerp-server.

I now have problems with installation of the data base... I'll take a look to other Bugs :)

Hope that helps someone

Revision history for this message
Schmirrwurst (schmirrwurst) wrote :
Revision history for this message
Schmirrwurst (schmirrwurst) wrote :

The openerp-server package, where never working properly, but now it will be pretty difficult in karmic, as python-xml, has been deleted from karmic repository (because unmaintained...) ! What to do ?

Is openerp planning to update upstream so that it could work with a maintained and packaged python-xml library ?

I think it is not realistic for karmic release, until ubuntu put python-xml back in the repo

Revision history for this message
Alan Bell (alanbell) wrote :

it would appear that libxml2 is the thing to import if you want to do xpath stuff. http://xmlsoft.org/python.html

Revision history for this message
Matthias Klose (doko) wrote :
Changed in python-xml (Ubuntu):
status: New → Invalid
Revision history for this message
scoder (scoder) wrote :

What about trying to port the code to libxml2dom? If it's based on PyXML,
that might not be too hard.

(and please do *not* make this a bug report against libxml2dom now!)

Revision history for this message
Alan Bell (alanbell) wrote :

looked into doing that then realised the debian package is actually 5.0.3 whereas karmic has 5.0.1 and the debian one already depends on python-lxml rather than python-xml I will put in a new bug as a packaging request

Revision history for this message
Alan Bell (alanbell) wrote :
Revision history for this message
Alan Bell (alanbell) wrote :

and corresponding packaging request for openerp-client https://bugs.launchpad.net/ubuntu/+source/openerp-client/+bug/425089

Revision history for this message
Alan Bell (alanbell) wrote :

ok, the server and client have now been released in Karmic and do install. There is a related bug in the way it was done (the code still depends on pyxml) but I will open a new bug for that.

Changed in openerp-server (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Alan Bell (alanbell) wrote :

https://bugs.launchpad.net/openobject-server/+bug/429519
bug to address transition from pyxml to libxml2

Revision history for this message
Jay Vora (Serpent Consulting Services) (jayvora) wrote :

Hello Subscribers,

Would you please confirm this whether it has been fixed for OpenERP or not?
so we can close it.
Thanks.

Revision history for this message
www.mgazelle.com (mgazelle) wrote :

The package installs without any problem in Karmic, the server however does not run with the /etc/init.d/openerp-server script.
The only way to get the server up and running is by the following way:

login as postgres using su postgres
launch the server with the command openerp-server start

is there any workaround to get the server autostarted without this manual procedure?

Revision history for this message
Laurent Bigonville (bigon) wrote :

@mgaz could you please add a new bug with that issue?

Revision history for this message
Jonathan Harker (jonathanharker) wrote :

This package installs ok in karmic.

Changed in openerp:
status: New → Fix Released
Revision history for this message
Jonathan Harker (jonathanharker) wrote :

I've just installed Ubuntu 9.04 jaunty fresh into a virtualbox and apt-get updated it.

Running apt-get install openerp-server now installs fine. There are no dependency errors, which was the original bug description. The apt-get output includes a message saying the postgresql must be set up manually and points to documentation in /usr/share/doc/openerp-server/README.Debian

Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote :

Hello,

I propose to fix the problem at the source. The trunk version of OpenERP, expected to stabilize around Q1 1010, is already deprecated XML lib free (thanks to fellow contribs).

Considering the issue is now worse on Karmic (read that report https://bugs.launchpad.net/openobject-server/+bug/429519 ), I proposed to Tiny to backport this fix back to the 5-0 releases of OpenERP. Yes this is a significant change. However, it's easy to test and will then behave in predicable ways. I did lot's of tests myself, have been very careful with the merge (more than Tiny themselves as logs show) and I just ask for testing heavily, but merging, to fix the issue once for all for Ubuntu and other modern distros. Also consider that I have been integrating OpenERP for two years as an OpenERP partner with around 5 success stories so I know a bit about it.

My fixed 5-0 up to date branch is there: https://code.launchpad.net/~akretion-team/openobject-server/openobject-server_5.0_patches

My merge proposal to Tiny for 5-0 server branch is there:
https://code.launchpad.net/~akretion-team/openobject-server/openobject-server_5.0_patches/+merge/14112

If you think that's the right thing to do, please weight behind me for the merge into the "stable" OpenERP branch.

Revision history for this message
Scott Kitterman (kitterman) wrote : Re: [Bug 337759] Re: openerp-server depends on python-xml and is therefore uninstallable ATM

I would suggest then that we integrate your changes into the Ubuntu package
as soon as Lucid is open for uploads. Once that is done, we can put the
updated package in jaunty/karmic-backports for users that want it. We
ought to be able to move to the offficial release before Lucid is released
nexy April.

Revision history for this message
vinayrks (vinay-rks) wrote : Re: [Bug 337759] Re: openerp-server depends on python-xml and is therefore uninstallable ATM
Download full text (4.1 KiB)

@mgz i am using openerp 5.06 on jaunty successfully , even manage to start
server automatically at server startup , for that I make openerp-server as
deamon
follow this link :
http://openobject.com/forum/post42914.html?sid=0ce55365c16e53046cef720a655d9b46
if problem persist , feel free t o contact me

On Thu, Oct 29, 2009 at 4:25 AM, Scott Kitterman <email address hidden>wrote:

> I would suggest then that we integrate your changes into the Ubuntu package
> as soon as Lucid is open for uploads. Once that is done, we can put the
> updated package in jaunty/karmic-backports for users that want it. We
> ought to be able to move to the offficial release before Lucid is released
> nexy April.
>
> --
> openerp-server depends on python-xml and is therefore uninstallable ATM
> https://bugs.launchpad.net/bugs/337759
> You received this bug notification because you are subscribed to
> OpenERP.
>
> Status in lxml - the Python XML toolkit: Invalid
> Status in Enterprise Management Software: Fix Released
> Status in Python: Invalid
> Status in “lxml” package in Ubuntu: Invalid
> Status in “openerp-server” package in Ubuntu: Fix Released
> Status in “python-xml” package in Ubuntu: Invalid
>
> Bug description:
> Binary package hint: openerp-server
>
> 1) The release of Ubuntu you are using, via 'lsb_release -rd' or System ->
> About Ubuntu.
>
> Description: Ubuntu jaunty (development branch)
> Release: 9.04
>
> 2) The version of the package you are using, via 'apt-cache policy
> packagename' or by checking in Synaptic.
>
> openerp-server:
> Installiert: (keine)
> Kandidat: 5.0.0-3-1ubuntu2
> Versions-Tabelle:
> 5.0.0-3-1ubuntu2 0
> 500 file: jaunty/universe Packages
> 500 http://de.archive.ubuntu.com jaunty/universe Packages
>
> 3) What you expected to happen
>
> Installation of the package ;)
>
> 4) What happened instead
>
> Dependency errors :)
>
>
> Details:
> =====
> openerp-server depends/build-depends on python-xml, which is fine. However,
> python-xml depends on python < 2.6 which isn't the default anymore in
> jaunty. This leads to an uninstallable package.
>
> I *suspect* the dependency on python-xml isn't needed anyway, since
> openerp's documentation states dependencies on:
> * psycopg2
> * reportlab
> * pychart
> * pydot
> * mxdatetime
> * xml, lxml and libxslt1
> * tz (timezone library)
> * PIL: Python Imaging Library (required for reportlab)
> * vobject: iCalendar and VCards parsing
> however, python-xml provides:
> * XML parsers: Pyexpat (Jack Jansen), xmlproc (Lars Marius
> Garshol), sgmlop (Fredrik Lundh).
> * SAX interface (Lars Marius Garshol)
> * minidom DOM implementation (Paul Prescod, others)
> * 4DOM and 4XPath from Fourthought (Uche Ogbuji, Mike Olson)
> * Schema implementations: TREX (James Tauber)
> * Various utility modules and functions (various people)
>
> (And openerp's ubuntu installation guide may state old package dependecies
> for python 2.4??)
>
> I think python-xml shouldn't be used anymore (it isn't maintained??!), at
> least I found this:
> https://bugs.launchpad.net/ubuntu/+source/python-xml/+bug/336631/comm...

Read more...

Revision history for this message
Yannick Warnier (ywarnier) wrote :

Just in case, I'm trying to install 5.0.6 on Karmic with Python 2.6 and I get the

ERROR: Import xpath module
ERROR: Try to install the old python-xml package
[...]
File "/usr/local/lib/python2.6/dist-packages/openerp-server/osv/orm.py", line 57, in <module>
   from xml import dom, xpath
ImportError cannot import name dom

However, as was suggested above, starting a Python intepreter and issuing "import xml.dom" is alright, it is only failing at "import xml.xpath".

Apparently there is no python-xml or python2.5-xml or anything of the likes directly in the Ubuntu Karmic repositories.
I have also left a (rather useless) comment here https://bugs.launchpad.net/openobject-server/+bug/429519

Revision history for this message
Yannick Warnier (ywarnier) wrote :

Well, this being said, I just removed "xpath" from line 57 of dist-packages/openerp-server/osv/orm.py's:
 "from xml import dom, xpath" -> "from xml import dom"
and my server could be launched right away. Funnny

Revision history for this message
Raphaël Valyi - http://www.akretion.com (rvalyi) wrote :

Hello guys,

I worked like made on this to get Tiny do do the work and luckily they did it.
Head 5.0 versions don't have the issue anymore and coming 5.0.7 release will have no issue on Ubuntu's.

I'm pasting the comment I posted here:

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

Guys,

sorry I forgot to notify all the related bugs:
this has been fixed when Tiny merged my branch in revision #1870 ( id <email address hidden> ) of openobject-server 5.0 branch. Trunk also already has the fix.

5.0 head now works out of the box like a charm on lasts Ubuntu's.
Can we switch the bug to fix released? Please shout if I'm wrong.

I let you deal with the packaging of coming 5.0.7 and the status of this bug meanwhile. Let's now focus on the other OpenERP hot issues to make it more straightforward!

Best regards

Revision history for this message
Raimon Esteve (www.zikzakmedia.com) (resteve) wrote :

I installed openerp-server in Ubuntu Karmic without python-xml library.
Experience: start server correct, create database and install modules. Create report and wizard run.

Finally openerp-server need python-xml?

Revision history for this message
Stephane Wirtel (OpenERP) (stephane-openerp) wrote :

We have dropped the support of python-xml in the stable and trunk versions.

We can close this bug !

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Related blueprints

Remote bug watches

Bug watches keep track of this bug in other bug trackers.