bzr: ERROR: No module named xml_errors when running 'bzr help commands' or tab-completion

Bug #955329 reported by Aditya V
38
This bug affects 8 people
Affects Status Importance Assigned to Milestone
bzr-xmloutput
New
Undecided
Unassigned
bzr-xmloutput (Ubuntu)
Fix Released
Critical
Unassigned

Bug Description

Ubuntu 12.04 Beta 1

Whenever I try to run "bzr help commands", I get this error:

bzr: ERROR: No module named xml_errors
You may need to install this Python library separately.

The same thing happens when I try to to tab-completion in gnome-terminal. I don't remember this issue to have happened in previous releases.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: bzr 2.5.0-1ubuntu1
ProcVersionSignature: Ubuntu 3.2.0-15.24-generic 3.2.5
Uname: Linux 3.2.9-kroqernel+ x86_64
ApportVersion: 1.94.1-0ubuntu2
Architecture: amd64
CheckboxSubmission: 7f98738f6663bda1ae1c2900a3a1db71
CheckboxSystem: 577751a334467e78ed04da699e5debc9
Date: Wed Mar 14 12:54:11 2012
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
PackageArchitecture: all
ProcEnviron:
 TERM=xterm
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: bzr
UpgradeStatus: Upgraded to precise on 2012-02-11 (32 days ago)

Revision history for this message
Aditya V (kroq-gar78) wrote :
Revision history for this message
Wouter van Heyst (larstiq) wrote :

Could you attach the output of `bzr help commands -Derror`? Adding the -Derror will show the underlying traceback which will give us a clue where things are going wrong.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

This is fixed in bzr-xmloutput trunk, it hasn't made its way into the precise package yet.

Changed in bzr (Ubuntu):
status: New → Triaged
importance: Undecided → High
importance: High → Critical
affects: bzr (Ubuntu) → bzr-xmloutput (Ubuntu)
Revision history for this message
Martin Packman (gz) wrote :

Same issue for the windows installers was resolved in bug 921754. For ubuntu, bug 918935 and particularly the ftbfs bug 935047 seem relevant.

Revision history for this message
Aditya V (kroq-gar78) wrote :
Download full text (3.6 KiB)

Wouter van Heyst asked me to post 'bzr help commands -Derror':

bzr: ERROR: exceptions.ImportError: No module named xml_errors

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/commands.py", line 1148, in ignore_pipe
    result = func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/bzrlib/builtins.py", line 4819, in run
    bzrlib.help.help(topic)
  File "/usr/lib/python2.7/dist-packages/bzrlib/help.py", line 53, in help
    outfile.write(source.get_help_text(shadowed_terms))
  File "/usr/lib/python2.7/dist-packages/bzrlib/help_topics/__init__.py", line 886, in get_help_text
    result = topic_registry.get_detail(self.topic)
  File "/usr/lib/python2.7/dist-packages/bzrlib/help_topics/__init__.py", line 92, in get_detail
    return obj(topic)
  File "/usr/lib/python2.7/dist-packages/bzrlib/help.py", line 79, in _help_commands_to_text
    shown_commands = [(n, o) for n, o in commands if o.hidden == hidden]
  File "/usr/lib/python2.7/dist-packages/bzrlib/help.py", line 78, in <genexpr>
    commands = ((n, _mod_commands.get_cmd_object(n)) for n in names)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 227, in get_cmd_object
    return _get_cmd_object(cmd_name, plugins_override)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 249, in _get_cmd_object
    cmd = hook(cmd, cmd_name)
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 321, in _get_plugin_command
    return plugin_cmds.get(cmd_name)()
  File "/usr/lib/python2.7/dist-packages/bzrlib/commands.py", line 86, in get
    return registry.Registry.get(self, real_name)
  File "/usr/lib/python2.7/dist-packages/bzrlib/registry.py", line 177, in get
    return self._dict[self._get_key_or_default(key)].get_obj()
  File "/usr/lib/python2.7/dist-packages/bzrlib/registry.py", line 74, in get_obj
    self._obj = get_named_object(self._module_name, self._member_name)
  File "/usr/lib/python2.7/dist-packages/bzrlib/pyutils.py", line 51, in get_named_object
    obj = __import__(module_name, {}, {}, from_list)
  File "/home/kroq-gar78/.bazaar/plugins/xmloutput/cmds.py", line 54, in <module>
    class cmd_xmlstatus(commands.Command):
  File "/home/kroq-gar78/.bazaar/plugins/xmloutput/cmds.py", line 107, in cmd_xmlstatus
    def run(self, file_list=None, revision=None, versioned=False, null=False):
  File "/usr/lib/python2.7/dist-packages/bzrlib/lazy_import....

Read more...

Revision history for this message
Aditya V (kroq-gar78) wrote :

Looks like tab-completion works now. Maybe set this to "Fix Released"?

Revision history for this message
Aditya V (kroq-gar78) wrote :

Should I set it to "Fix Released"? Auto-complete works perfectly now.

Jelmer Vernooij (jelmer)
Changed in bzr-xmloutput (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Rainer Müller (raimue) wrote :

The bug still exists in the current release bzr-xmloutput 0.8.8.

Revision history for this message
Aditya V (kroq-gar78) wrote :

I was trying to confirm Rainer Müller's statement, but I don't even have the bzr-xmloutput package installed! I ran "dpkg -s bzr-xmloutput | grep Version" to check my computer's version, but it said:

"Package `bzr-xmloutput' is not installed and no info is available."

So I can't confirm that it really does affect 0.8.8. And yes, my auto-complete works...

raimue,
Which Ubuntu version are you using? I'm on 12.04, by the way.

Revision history for this message
Trebor Rude (treborrude) wrote :

To expand on Jelmer Vernooij's statement above, this was fixed by the changes to cmds.py in commit 160 of the bzr-xmloutput trunk. Specifically, changing the import of xml_errors from a lazy import to a regular import (and specifying the entire package name).

Revision history for this message
W. Prins (wprins) wrote :

Ran into this problem just now trying to get a new bazaar installation (against Python 2.7) working. (Based on bzr-xmloutput 0.8.8. May try grabbing code from head now and see if that helps...)

Revision history for this message
W. Prins (wprins) wrote :

OK, replacing the official version 0.8.8 with the latest checkout from head (0.8.9) fixed it for me.

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

Other bug subscribers

Remote bug watches

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