/usr/lib/python2.5/site-packages/_xmlplus exists but is empty, causing import error

Bug #212917 reported by offby1
4
Affects Status Importance Assigned to Milestone
Bazaar
Invalid
Undecided
Unassigned
bzr (Ubuntu)
Invalid
Undecided
Matthias Klose
python-xml (Ubuntu)
Fix Released
Undecided
Matthias Klose

Bug Description

Ubuntu hardy (development branch) \n \l

$ bzr version-info
revision-id: <email address hidden>
date: 2008-04-05 17:46:35 +0100
build-date: 2008-04-06 09:37:32 -0700
revno: 3336
branch-nick: bzr

-*- mode: compilation; default-directory: "/usr/local/src/bzr/" -*-
Compilation started at Sun Apr 6 09:35:31

make check
...
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.5 -c bzrlib/_patiencediff_c.c -o build/temp.linux-i686-2.5/bzrlib/_patiencediff_c.o
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions build/temp.linux-i686-2.5/bzrlib/_patiencediff_c.o -o bzrlib/_patiencediff_c.so
python -Werror -O ./bzr selftest -1v
testing: /usr/local/src/bzr/bzr
   /usr/local/src/bzr/bzrlib (1.4dev python2.5.2)

bzr: ERROR: exceptions.ImportWarning: Not importing directory '/usr/lib/python2.5/site-packages/_xmlplus': missing __init__.py

Traceback (most recent call last):
  File "/usr/local/src/bzr/bzrlib/commands.py", line 834, in run_bzr_catch_errors
    return run_bzr(argv)
  File "/usr/local/src/bzr/bzrlib/commands.py", line 790, in run_bzr
    ret = run(*run_argv)
  File "/usr/local/src/bzr/bzrlib/commands.py", line 492, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/local/src/bzr/bzrlib/builtins.py", line 2703, in run
    load_list=load_list,
  File "/usr/local/src/bzr/bzrlib/tests/__init__.py", line 2536, in selftest
    suite = test_suite(keep_only)
  File "/usr/local/src/bzr/bzrlib/tests/__init__.py", line 2809, in test_suite
    suite.addTest(loader.loadTestsFromModuleNames(testmod_names))
  File "/usr/local/src/bzr/bzrlib/tests/TestUtil.py", line 92, in loadTestsFromModuleNames
    result.addTests(self.loadTestsFromModuleName(name))
  File "/usr/local/src/bzr/bzrlib/tests/TestUtil.py", line 97, in loadTestsFromModuleName
    module = _load_module_by_name(name)
  File "/usr/local/src/bzr/bzrlib/tests/TestUtil.py", line 166, in _load_module_by_name
    module = __import__(mod_name)
  File "/usr/local/src/bzr/bzrlib/tests/test_bundle.py", line 33, in <module>
    from bzrlib.bundle.bundle_data import BundleTree
  File "/usr/local/src/bzr/bzrlib/bundle/bundle_data.py", line 42, in <module>
    from bzrlib.xml5 import serializer_v5
  File "/usr/local/src/bzr/bzrlib/xml5.py", line 26, in <module>
    from bzrlib.xml_serializer import SubElement, Element, Serializer
  File "/usr/local/src/bzr/bzrlib/xml_serializer.py", line 31, in <module>
    from xml.etree.cElementTree import (ElementTree, SubElement, Element,
  File "/usr/lib/python2.5/xml/__init__.py", line 32, in <module>
    import _xmlplus
  File "/usr/lib/python2.5/warnings.py", line 62, in warn
    globals)
  File "/usr/lib/python2.5/warnings.py", line 102, in warn_explicit
    raise message
ImportWarning: Not importing directory '/usr/lib/python2.5/site-packages/_xmlplus': missing __init__.py

bzr 1.4dev on python 2.5.2 (linux2)
arguments: ['./bzr', 'selftest', '-1v']
encoding: 'ANSI_X3.4-1968', fsenc: 'ANSI_X3.4-1968', lang: None
plugins:
  launchpad /usr/local/src/bzr/bzrlib/plugins/launchpad [unknown]
*** Bazaar has encountered an internal error.
    Please report a bug at https://bugs.launchpad.net/bzr/+filebug
    including this traceback, and a description of what you
    were doing when the error occurred.
make: *** [check] Error 4

Compilation exited abnormally with code 2 at Sun Apr 6 09:36:13

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 212917] [NEW] "make check" got an internal error
  • unnamed Edit (189 bytes, application/pgp-signature; name=signature.asc)

I believe this is a hardy python issue, not a bzr issue.

the _xmlplus module is not supplied or directly used by bzr AFAIK.

-Rob
--
GPG key available at: <http://www.robertcollins.net/keys.txt>.

Revision history for this message
Martin Pool (mbp) wrote : Re: "make check" got an internal error

Not our bug

Changed in bzr:
status: New → Invalid
Revision history for this message
Martin Pool (mbp) wrote :

It's not a Bazaar bug; it's probably a Hardy problem in some python package. I'm not sure precisely which package.

This commanrd reproduces it:

  python -Werror -c 'import xml.etree.cElementTree'

mbp@grace% dpkg -S /usr/lib/python2.5/site-packages/_xmlplus
dpkg: /usr/lib/python2.5/site-packages/_xmlplus not found.

Steve Langasek (vorlon)
Changed in python2.5:
milestone: none → ubuntu-8.04
Joey Stanford (joey)
description: updated
Colin Watson (cjwatson)
Changed in python2.5:
assignee: nobody → doko
Revision history for this message
Matthias Klose (doko) wrote :

python -Werror -c 'import xml.etree.cElementTree' works fine for me on hardy.

apparently some things are used from the old / deprecated python-xml package during the test run, which is not anymore in sys.path directly to avoid the overlays with the xml code in python2.4 and python2.5.

  - bzr upstream should not rely on this package for tests, but use the xml code from the python2.4/python2.5 core library
  - the package should ignore the tests using python-xml, or b-d on python-xml and adding the module to sys.path
   directly

Changed in python-xml:
status: New → Invalid
Changed in bzr:
status: Invalid → Confirmed
assignee: nobody → doko
status: New → Confirmed
Revision history for this message
Matthias Klose (doko) wrote :

hmm, bzr itself doesn't use anything of the old xml code ...

Changed in bzr:
status: Confirmed → Invalid
Revision history for this message
Matthias Klose (doko) wrote :

offby1, please could you list the contents of /usr/lib/python2.5/site-packages/_xmlplus and /usr/lib/python2.5/site-packages/oldxml ?

Changed in python-xml:
status: Invalid → Incomplete
Changed in bzr:
status: Confirmed → Invalid
Revision history for this message
Steve Langasek (vorlon) wrote :

$ ls -lAR /usr/lib/python2.5/site-packages/_xmlplus
/usr/lib/python2.5/site-packages/_xmlplus:
total 8
drwxr-xr-x 6 root root 4096 2008-04-02 01:02 dom
drwxr-xr-x 2 root root 4096 2008-04-02 01:02 sax

/usr/lib/python2.5/site-packages/_xmlplus/dom:
total 16
drwxr-xr-x 2 root root 4096 2008-04-02 01:02 de
drwxr-xr-x 2 root root 4096 2008-04-02 01:02 en_US
drwxr-xr-x 2 root root 4096 2008-04-02 01:02 ext
drwxr-xr-x 2 root root 4096 2008-04-02 01:02 fr

/usr/lib/python2.5/site-packages/_xmlplus/dom/de:
total 0

/usr/lib/python2.5/site-packages/_xmlplus/dom/en_US:
total 0

/usr/lib/python2.5/site-packages/_xmlplus/dom/ext:
total 0

/usr/lib/python2.5/site-packages/_xmlplus/dom/fr:
total 0

/usr/lib/python2.5/site-packages/_xmlplus/sax:
total 0
$ ls -l /usr/lib/python2.5/site-packages/oldxml
total 4
lrwxrwxrwx 1 root root 47 2008-04-02 01:02 PyXML-0.8.4.egg-info -> /usr/share/pyshared/oldxml/PyXML-0.8.4.egg-info
drwxr-xr-x 10 root root 4096 2008-04-02 01:03 _xmlplus
$

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-xml - 0.8.4-10ubuntu2

---------------
python-xml (0.8.4-10ubuntu2) hardy; urgency=low

  * Explicitely remove /usr/lib/python2.[345]/site-packages/_xmlplus,
    likely be left by an earlier python-central version. LP: #212917.

 -- Matthias Klose <email address hidden> Wed, 09 Apr 2008 13:40:31 +0200

Changed in python-xml:
status: Incomplete → Fix Released
Revision history for this message
Matthias Klose (doko) wrote :

could not reproduce this with a gutsy -> hardy upgrade. Uploaded a new version which explicitely removes the old directory. If the python-xml package is already removed, please install it again (the current version), and remove it again.

Revision history for this message
Martin Pool (mbp) wrote : Re: [Bug 212917] Re: /usr/lib/python2.5/site-packages/_xmlplus exists but is empty, causing import error

That worked for me, thanks.

--
Martin <http://launchpad.net/~mbp/>

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

Other bug subscribers

Bug attachments

Remote bug watches

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