bzr: ERROR: No module named expat; use SimpleXMLTreeBuilder instead

Erik de Castro Lopo mle+tools at mega-nerd.com
Fri Mar 23 07:53:54 UTC 2012


Hi all,

I hadn't used bzr on my Debian test/unstable machine for a while
but now I'm getting the following error:

    $ bzr branch ~/Bzr/libsndfile-dev libsndfile-tmp
    bzr: ERROR: No module named expat; use SimpleXMLTreeBuilder instead                                
    You may need to install this Python library separately.

The $HOME/.bzr.log is below.

Cheers,
Erik

Fri 2012-03-23 18:50:58 +1100
0.173  bazaar version: 2.5.0dev6
0.173  bzr arguments: [u'branch', u'/home/erikd/Bzr/libsndfile-dev', u'libsndfile-dev']
0.178  looking for plugins in /home/erikd/.bazaar/plugins
0.178  looking for plugins in /usr/lib/python2.7/dist-packages/bzrlib/plugins
0.216  encoding stdout as sys.stdout encoding 'ANSI_X3.4-1968'
0.296  opening working tree '/home/erikd/Bzr/libsndfile-dev'
0.344  opening working tree '/home/erikd/Bzr/libsndfile-dev'
0.365  creating repository in file:///tmp/libsndfile-dev/.bzr/.
0.382  Using fetch logic to copy between KnitPackRepository('file:///home/erikd/Bzr/libsndfile-dev/.bzr/repository/')(RepositoryFormatKnitPack1()) and KnitPackRepository('file:///tmp/libsndfile-dev/.bzr/repository/')(RepositoryFormatKnitPack1())
0.385  fetching: <PendingAncestryResult heads:frozenset(['erikd at mega-nerd.com-20111223211424-yp9n0wixrum6kdmm']) repo:KnitPackRepository('file:///home/erikd/Bzr/libsndfile-dev/.bzr/repository/')>
5.574  creating branch <bzrlib.branch.BzrBranchFormat6 object at 0x14717d0> in file:///tmp/libsndfile-dev/
5.589  created new branch BzrBranch6(file:///tmp/libsndfile-dev/)
5.592  trying to create missing lock '/tmp/libsndfile-dev/.bzr/checkout/dirstate'
5.594  opening working tree '/tmp/libsndfile-dev'
5.612  Transferred: 0kB (0.0kB/s r:0kB w:0kB)
5.621  Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 920, in exception_to_return_code
    return the_callable(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 1131, in run_bzr
    ret = run(*run_argv)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 673, in run_argv_aliases
    return self.run(**all_cmd_args)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 695, in run
    return self._operation.run_simple(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 136, in run_simple
    self.cleanups, self.func, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/builtins.py", line 1455, in run
    source_branch=br_from)
  File "/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.py", line 365, in sprout
    create_tree_if_local=create_tree_if_local)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 132, in run
    self.cleanups, self.func, self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/cleanup.py", line 166, in _do_with_cleanups
    result = func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.py", line 433, in _sprout
    hardlink=hardlink, from_branch=result_branch)
  File "/usr/lib/python2.7/dist-packages/bzrlib/bzrdir.py", line 854, in create_workingtree
    accelerator_tree=accelerator_tree, hardlink=hardlink)
  File "/usr/lib/python2.7/dist-packages/bzrlib/workingtree_4.py", line 1522, in initialize
    basis = branch.repository.revision_tree(revision_id)
  File "/usr/lib/python2.7/dist-packages/bzrlib/decorators.py", line 155, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/vf_repository.py", line 1838, in revision_tree
    inv = self.get_inventory(revision_id)
  File "/usr/lib/python2.7/dist-packages/bzrlib/decorators.py", line 155, in read_locked
    result = unbound(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/vf_repository.py", line 1731, in get_inventory
    return self.iter_inventories([revision_id]).next()
  File "/usr/lib/python2.7/dist-packages/bzrlib/vf_repository.py", line 1749, in iter_inventories
    for inv, revid in self._iter_inventories(revision_ids, ordering):
  File "/usr/lib/python2.7/dist-packages/bzrlib/vf_repository.py", line 1761, in _iter_inventories
    yield self._deserialise_inventory(revision_id, text), revision_id
  File "/usr/lib/python2.7/dist-packages/bzrlib/vf_repository.py", line 1807, in _deserialise_inventory
    return_from_cache=self._safe_to_return_from_cache)
  File "/usr/lib/python2.7/dist-packages/bzrlib/xml_serializer.py", line 80, in read_inventory_from_string
    return self._unpack_inventory(fromstring(xml_string), revision_id,
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1300, in XML
    parser = XMLParser(target=TreeBuilder())
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1466, in __init__
    "No module named expat; use SimpleXMLTreeBuilder instead"
ImportError: No module named expat; use SimpleXMLTreeBuilder instead

5.621  return code 3

-- 
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/



More information about the bazaar mailing list