FS#37990 - [virt-manager] TypeError: getInfo() takes exactly 2 arguments (1 given)

Attached to Project: Community Packages
Opened by Jason (q5p4k0) - Tuesday, 03 December 2013, 19:43 GMT
Last edited by Sergej Pupykin (sergej) - Friday, 06 December 2013, 09:13 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture x86_64
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 19
Private No

Details

Description: virt-manager 0.10.0-4


Package was recently updated. Appears libvirt-python added as in dependency -4. May be conflicting libvirt;


Error launching host dialog: 'NoneType' object has no attribute '__getitem__'

Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/engine.py", line 568, in _do_show_host
self._get_host_dialog(uri).show()
File "/usr/share/virt-manager/virtManager/engine.py", line 555, in _get_host_dialog
obj = vmmHost(con)
File "/usr/share/virt-manager/virtManager/host.py", line 75, in __init__
self.init_conn_state()
File "/usr/share/virt-manager/virtManager/host.py", line 275, in init_conn_state
memory = self.conn.pretty_host_memory_size()
File "/usr/share/virt-manager/virtManager/connection.py", line 222, in pretty_host_memory_size
return util.pretty_mem(self.host_memory_size())
File "/usr/share/virt-manager/virtManager/connection.py", line 227, in host_memory_size
return self.hostinfo[1] * 1024
TypeError: 'NoneType' object has no attribute '__getitem__'
This task depends upon

Closed by  Sergej Pupykin (sergej)
Friday, 06 December 2013, 09:13 GMT
Reason for closing:  Fixed
Comment by Roland Lezuo (iroli) - Tuesday, 03 December 2013, 21:20 GMT
same problem here.
running
$ virt-manager --debug
also reveals:

Exception in thread Tick thread:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/share/virt-manager/virtManager/engine.py", line 301, in _tick
conn.tick()
File "/usr/share/virt-manager/virtManager/connection.py", line 1281, in tick
self._tick(noStatsUpdate)
File "/usr/share/virt-manager/virtManager/connection.py", line 1290, in _tick
self.hostinfo = self.vmm.getInfo()
TypeError: getInfo() takes exactly 2 arguments (1 given)

Seems to be some version mismatch ...
Comment by chu (uhc) - Wednesday, 04 December 2013, 00:32 GMT
Same problem for me

Exception in thread Tick thread:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/share/virt-manager/virtManager/engine.py", line 301, in _tick
conn.tick()
File "/usr/share/virt-manager/virtManager/connection.py", line 1281, in tick
self._tick(noStatsUpdate)
File "/usr/share/virt-manager/virtManager/connection.py", line 1290, in _tick
self.hostinfo = self.vmm.getInfo()
TypeError: getInfo() takes exactly 2 arguments (1 given)
Comment by Sebastián Peyrott (Pse) - Wednesday, 04 December 2013, 03:08 GMT
I'm seeing this too. The exact same traceback as the OP, triggered when trying to open the dialog for either QEMU or LXC.
Comment by jasonz (jasonz) - Wednesday, 04 December 2013, 03:25 GMT
Same problem.
I tried to restart libvirt, ``sudo systemctl restart libvirtd.service``.
When I typed ``sudo systemctl status libvirtd.service``, it printed out
...
Could not find 'ebtables' executable
Cannot find 'pm-is-supported' in path: No such file or directory
...
So I installed ``ebtables`` and ``pm-utils`` and restarted ``libvirtd.service``.
``libvirtd.service`` can restart normally, but ``virt-manager`` still gets ``'NoneType' object has no attribute '__getitem__'``.
Comment by Ray Magini (spicewiesel) - Wednesday, 04 December 2013, 08:45 GMT
approved.

I'm not able to see or start my existing VMs.
Comment by Ezio Vergine (virgolus) - Wednesday, 04 December 2013, 10:08 GMT
Same problem here. I tought is related to a python update I made yesterday
Comment by Roland Lezuo (iroli) - Wednesday, 04 December 2013, 13:16 GMT
As a work around to start ones virtual machines:

$ virsh -c qemu:///system start NAME_OF_VM

and then connect via VNC as usual
Comment by Gabi Hulea (gabi.hulea) - Wednesday, 04 December 2013, 14:02 GMT
Same problem here. System update failed initially due to a new dependency, libvirt-python-1.2.0-1, with the message:

error: failed to commit transaction (conflicting files)
libvirt-python: /usr/lib/python2.7/site-packages/libvirt.pyc exists in filesystem
Errors occurred, no packages were upgraded.

Removing /usr/lib/python2.7/site-packages/libvirt.pyc allowed the update to be applied, but virt-manager fails to list existing VMs with the OP message.
Comment by Maykel Franco (maykel535) - Wednesday, 04 December 2013, 14:24 GMT
Yes. I removed too the file libvirt.pyc because the upgrade "pacman -Syu" will be sucessfull.

What solution for this bug?? I like kvm and arch very much...

Thanks.
Comment by Arti Zirk (arti) - Wednesday, 04 December 2013, 23:36 GMT
It seems to me that virt-manager 0.10 just doesn't support libvirt and libvirt-python 1.2.

I installed virt-manager-git from aur and that seems to fix that "Exception in thread Tick thread" error but has other problems and isn't usable.
Comment by Ivan (Zipfer) - Thursday, 05 December 2013, 09:35 GMT
How can I downgrade versions of some packages to fix this problem?
Comment by Alfonso Ricardo de la Guarda Reyes (alfonsodg) - Thursday, 05 December 2013, 11:11 GMT
Hi, Same problem here, however i have test with the original sources and the problem still present but isn't clear if the problem goes with virt-manager or some library

Exception in thread Tick thread:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "/usr/share/virt-manager/virtManager/engine.py", line 301, in _tick
conn.tick()
File "/usr/share/virt-manager/virtManager/connection.py", line 1281, in tick
self._tick(noStatsUpdate)
File "/usr/share/virt-manager/virtManager/connection.py", line 1290, in _tick
self.hostinfo = self.vmm.getInfo()
TypeError: getInfo() takes exactly 2 arguments (1 given)
Comment by Roman Golovin (dantix) - Thursday, 05 December 2013, 16:20 GMT
@Ivan (Zipfer)
You can use "sudo pacman -U /var/cache/pacman/pkg/libvirt-1.1.4-1-x86_64.pkg.tar.xz" or another version. If this will fail, try to remove "libvirt-python" package.
Comment by Maykel Franco (maykel535) - Thursday, 05 December 2013, 16:37 GMT
I'm spanish;

maykel-arch /home/maykel # pacman -U /var/cache/pacman/pkg/libvirt-1.1.4-1-x86_64.pkg.tar.xz
cargando paquetes...
atención: desactualizando la versión del paquete libvirt (1.2.0-1 => 1.1.4-1)
resolviendo dependencias...
verificando conflictos...

Paquetes (1): libvirt-1.1.4-1

Tamaño Total Instalado: 35,41 MiB
Tamaño neto a actualizar: 0,25 MiB

:: ¿Continuar con la instalación? [S/n]
(1/1) verificando llaves en el llavero [#############################################################] 100%
(1/1) verificando la integridad de los paquetes [#############################################################] 100%
(1/1) cargando los archivos del paquete... [#############################################################] 100%
(1/1) verificando conflictos entre archivos [#############################################################] 100%
error: error al realizar la transacción (archivos en conflicto)
libvirt: /usr/lib/python2.7/site-packages/libvirt.py existe en el sistema de archivos
libvirt: /usr/lib/python2.7/site-packages/libvirt_lxc.py existe en el sistema de archivos
libvirt: /usr/lib/python2.7/site-packages/libvirt_qemu.py existe en el sistema de archivos
libvirt: /usr/lib/python2.7/site-packages/libvirtmod.so existe en el sistema de archivos
libvirt: /usr/lib/python2.7/site-packages/libvirtmod_lxc.so existe en el sistema de archivos
libvirt: /usr/lib/python2.7/site-packages/libvirtmod_qemu.so existe en el sistema de archivos
Ocurrieron errores, no se actualizaron paquetes
maykel-arch /home/maykel :( # pacman -R libvirt-python
comprobando dependencias...
error: error al preparar la transacción (no se pudieron satisfacer las dependencias)
:: virt-manager: necesita libvirt-python
Comment by Jason (q5p4k0) - Thursday, 05 December 2013, 16:39 GMT
I can confirm, that Zipfer's suggested method works for me:

sudo pacman -R virt-manager
sudo pacman -R libvirt-python
sudo pacman -R libvirt-glib
sudo pacman -R libvirt
sudo pacman -U libvirt-1.1.4-1-x86_64.pkg.tar.xz
sudo pacman -U virt-manager-0.10.0-3-any.pkg.tar.xz

virt-manager now works.
Comment by Ezio Vergine (virgolus) - Thursday, 05 December 2013, 16:44 GMT
Where should I download these package? my pacman cache is empty...
Comment by Maykel Franco (maykel535) - Thursday, 05 December 2013, 16:45 GMT
Yeah, this solved the problem getitem, but I have other error:

Imposible completar la instalación: 'Error interno: el proceso ha finalizado mientras se conectaba con el monitor: qemu-system-x86_64: -drive file=/home/maykel/archlinux-2013.10.01-dual.iso,if=none,id=drive-ide0-1-0,readonly=on,format=raw: could not open disk image /home/maykel/archlinux-2013.10.01-dual.iso: Permission denied
'

Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 100, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/create.py", line 1920, in do_install
guest.start_install(False, meter=meter)
File "/usr/share/virt-manager/virtinst/Guest.py", line 1134, in start_install
noboot)
File "/usr/share/virt-manager/virtinst/Guest.py", line 1202, in _create_guest
dom = self.conn.createLinux(start_xml or final_xml, 0)
File "/usr/lib/python2.7/site-packages/libvirt.py", line 2897, in createLinux
if ret is None:raise libvirtError('virDomainCreateLinux() failed', conn=self)
libvirtError: Error interno: el proceso ha finalizado mientras se conectaba con el monitor: qemu-system-x86_64: -drive file=/home/maykel/archlinux-2013.10.01-dual.iso,if=none,id=drive-ide0-1-0,readonly=on,format=raw: could not open disk image /home/maykel/archlinux-2013.10.01-dual.iso: Permission denied


Comment by Roman Golovin (dantix) - Thursday, 05 December 2013, 16:51 GMT
You can find old version of packages as described here - https://wiki.archlinux.org/index.php/Arch_Rollback_Machine
Comment by Claudio (cb73) - Thursday, 05 December 2013, 17:41 GMT
This is caused by a broken libvirt-python build. See https://bugs.archlinux.org/task/38027
Comment by Andrej Podzimek (andrej) - Thursday, 05 December 2013, 23:24 GMT
It works for me again. Wow! I guess libvirt-python 1.2.0-2 resolved the issue. It only works with virt-manager, not with virt-manager-git. (The problem persists with the latter.)
Comment by Sebastián Peyrott (Pse) - Friday, 06 December 2013, 03:24 GMT
I can confirm everything's back to normal with livbirt-python 1.2.0-2.
Comment by Gabi Hulea (gabi.hulea) - Friday, 06 December 2013, 08:16 GMT
Confirm as fixed here too after updating libvirt-python to 1.2.0-2.
Comment by Ray Magini (spicewiesel) - Friday, 06 December 2013, 08:24 GMT
+1

Loading...