missing dependency: python-xml

Bug #174048 reported by agent 8131 on 2007-12-05
8
Affects Status Importance Assigned to Milestone
xen-3.1 (Ubuntu)
Undecided
Unassigned
Hardy
Undecided
Unassigned
xen-3.2 (Ubuntu)
Undecided
Unassigned
Hardy
Undecided
Unassigned

Bug Description

Running the command: xm new testdom.cfg

Results in the following:

Unexpected error: <type 'exceptions.ImportError'>

Please report to <email address hidden>
Traceback (most recent call last):
  File "/usr/sbin/xm", line 10, in <module>
    main.main(sys.argv)
  File "/usr/lib/python2.5/site-packages/xen/xm/main.py", line 2453, in main
    _, rc = _run_cmd(cmd, cmd_name, args)
  File "/usr/lib/python2.5/site-packages/xen/xm/main.py", line 2477, in _run_cmd
    return True, cmd(args)
  File "<string>", line 1, in <lambda>
  File "/usr/lib/python2.5/site-packages/xen/xm/main.py", line 1265, in xm_importcommand
    cmd = __import__(command, globals(), locals(), 'xen.xm')
  File "/usr/lib/python2.5/site-packages/xen/xm/new.py", line 26, in <module>
    from xen.xm.xenapi_create import *
  File "/usr/lib/python2.5/site-packages/xen/xm/xenapi_create.py", line 23, in <module>
    from xml.parsers.xmlproc import xmlproc, xmlval, xmldtd
ImportError: No module named xmlproc

To fix I ran: sudo apt-get install python-xml

The command worked fine after that. So it appears that some xm commands depend on the python-xml package being installed. Seems like it would make sense to make it a dependency. It might help reduce the number of bugs being reported.

Chuck Short (zulcss) wrote :

This is fixed in the hardy version.

Changed in xen-3.1:
status: New → In Progress
Aleksandr Charkov (alcharkov) wrote :

Not working in hardy too for me

Changed in xen-3.1:
status: In Progress → Confirmed
Aleksandr Charkov (alcharkov) wrote :

Upps, last my post not belong to this topic, sorry.

agent 8131 (agent-8131) wrote :

I've just verified that this problem still exists on Hardy beta. When running Ubuntu 8.04 Server beta and installing xen-utils-3.2 or xen-utils-3.1 there is no xml library installed which causes xm commands to fail. This can be replicated from a fresh install of Ubuntu Server 8.04 beta or a system without the python xml libraries installed by executing the following commands:

# apt-get install xen-utils-3.2
# xm new
...
ImportError: No module named xmlproc

# apt-get install xen-utils-3.1
# xm new
...
ImportError: No module named xmlproc

Changed in xen-3.1:
status: New → Confirmed
David Portwood (dzportwood) wrote :

Debdiffs for i386/amd64 attached.

David Clymer (vezult) wrote :

This has not been fixed in the hardy heron release.

I got the same error when I originally tried to do:

# xm create

After installing python-xml, I no longer get the error when doing xm create, but I _do_ continue to see it when using xm new:

root@gorilla:/etc/xen# xm create asterisk -f /etc/xen/asterisk.cfg
Using config file "/etc/xen/asterisk.cfg".
Started domain asterisk
root@gorilla:/etc/xen# xm list
Name ID Mem VCPUs State Time(s)
Domain-0 0 3375 2 r----- 514.9
asterisk 1 512 1 -b---- 2.7

root@gorilla:/etc/xen# xm new
Unexpected error: <type 'exceptions.ImportError'>

Please report to <email address hidden>
Traceback (most recent call last):
  File "/usr/sbin/xm", line 10, in <module>
    main.main(sys.argv)
  File "/usr/lib/python2.5/site-packages/xen/xm/main.py", line 2535, in main
    _, rc = _run_cmd(cmd, cmd_name, args)
  File "/usr/lib/python2.5/site-packages/xen/xm/main.py", line 2559, in _run_cmd
    return True, cmd(args)
  File "<string>", line 1, in <lambda>
  File "/usr/lib/python2.5/site-packages/xen/xm/main.py", line 1308, in xm_importcommand
    cmd = __import__(command, globals(), locals(), 'xen.xm')
  File "/usr/lib/python2.5/site-packages/xen/xm/new.py", line 26, in <module>
    from xen.xm.xenapi_create import *
  File "/usr/lib/python2.5/site-packages/xen/xm/xenapi_create.py", line 23, in <module>
    from xml.parsers.xmlproc import xmlproc, xmlval, xmldtd
ImportError: No module named xmlproc

root@gorilla:/etc/xen# apt-cache policy python-xml
python-xml:
  Installed: 0.8.4-10ubuntu2
  Candidate: 0.8.4-10ubuntu2
  Version table:
 *** 0.8.4-10ubuntu2 0
        500 http://apt.hrcsb.org hardy/universe Packages
        100 /var/lib/dpkg/status

Rob Frohne (frohro) wrote :

I have the same problem with the latest grc (Gnu Radio Companion used with GnuRadio) and Hardy.

Rob

Mike Loseke (mike-tummy) wrote :

I'm seeing the "ImportError: No module named xmlproc" error after making sure that python-xml is installed on hardy using xen-3.2, the same as others have shown:

root@hardy:~# xm new
Unexpected error: <type 'exceptions.ImportError'>

Please report to <email address hidden>
Traceback (most recent call last):
  File "/usr/sbin/xm", line 10, in <module>
    main.main(sys.argv)
  File "/usr/lib/python2.5/site-packages/xen/xm/main.py", line 2535, in main
    _, rc = _run_cmd(cmd, cmd_name, args)
  File "/usr/lib/python2.5/site-packages/xen/xm/main.py", line 2559, in _run_cmd
    return True, cmd(args)
  File "<string>", line 1, in <lambda>
  File "/usr/lib/python2.5/site-packages/xen/xm/main.py", line 1308, in xm_importcommand
    cmd = __import__(command, globals(), locals(), 'xen.xm')
  File "/usr/lib/python2.5/site-packages/xen/xm/new.py", line 26, in <module>
    from xen.xm.xenapi_create import *
  File "/usr/lib/python2.5/site-packages/xen/xm/xenapi_create.py", line 23, in <module>
    from xml.parsers.xmlproc import xmlproc, xmlval, xmldtd
ImportError: No module named xmlproc

drivinghome (drivinghome) wrote :

as workaround you can edit '/usr/sbin/xm' and add

sys.path.append('/usr/lib/python%s/site-packages/oldxml' % sys.version[:3])

after the two appends. See the Changelog here -> https://launchpad.net/ubuntu/hardy/+source/python-xml/0.8.4-10ubuntu1

Greetings,
tzu

Paul Hummer (rockstar) wrote :

I've looked extensively at this bug. Sure, adding python-xml as a dependency helps, but the python-xml library is broken, slightly.

Apparently, it's an "old bug" where some of the python-xml is being broken up into core and oldxml. However, nothing in oldxml is accessible. While tzu's workaround will work, the best solution is:

`echo 'oldxml' > /usr/lib/python2.5/site-packages/oldxml.pth`

I'll look into generating a debdiff for this, and getting it submitted.

Rolf Leggewie (r0lf) wrote :

Hardy has seen the end of its life and is no longer receiving any updates. Marking the Hardy task for this ticket as "Won't Fix".

Changed in xen-3.1 (Ubuntu Hardy):
status: Confirmed → Won't Fix
Changed in xen-3.2 (Ubuntu Hardy):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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