[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [virt-tools-list] [BUG] [virt-manager] [tip] checking for virtinst fails

On 11/12/2009 10:30 AM, Jon Nordby wrote:
> Introduced by cfd9ab725445. Errormessage:
> "Traceback (most recent call last):
>   File "/home/jon/local/share/virt-manager/virt-manager.py", line 401, in
> <module>
>     main()
>   File "/home/jon/local/share/virt-manager/virt-manager.py", line 304, in
> main
>     raise RuntimeError(str(e) + "\n\n" + msg)
> RuntimeError: 'module' object has no attribute '__version__'
> virt-manager requires the python-virtinst library version 0.400.3 or
> greater. This can be downloaded at:
> http://virt-manager.org/download.html";

You'll need to pull virtinst from source to resolve this. Yesterday I
added the __version__ value to virtinst to help resolve dependency issues.

The issue here is people building a virt-manager release but not
updating virtinst, and then virt-manager bombs out trying to use a new
virtinst feature. virtinst and virt-manager are pretty much developed in
lockstep, so this happens just about every release. We should probably
merge the two projects into one tar.gz release but I haven't looked into
that yet.

For people like yourself building from upstream this will be a one time
annoyance. I probably should have sent an email to the list, sorry about
that. Since you are doing virt-manager work, it is probably good to get
into the habit of updating virtinst from source regularly.

> I have virtinst 0.500.0 installed and it is working as expected.
>>>> import virtinst
>>>> dir(virtinst)
> ['CapabilitiesParser', 'CloneDesign', 'CloneManager', 'DistroInstaller',
> 'FullVirtGuest', 'Guest', 'ImageFetcher', 'ImageInstaller', 'ImageManager',
> 'ImageParser', 'ImportInstaller', 'Installer', 'LiveCDInstaller',
> 'NodeDeviceParser', 'OSDistro', 'PXEInstaller', 'ParaVirtGuest', 'Storage',
> 'User', 'VirtualAudio', 'VirtualCharDevice', 'VirtualDevice', 'VirtualDisk',
> 'VirtualGraphics', 'VirtualHostDevice', 'VirtualHostDevicePCI',
> 'VirtualHostDeviceUSB', 'VirtualInputDevice', 'VirtualNetworkInterface',
> 'VirtualVideoDevice', 'XenDisk', 'XenGuest', 'XenNetworkInterface',
> '__all__', '__builtins__', '__doc__', '__file__', '__name__', '__package__',
> '__path__', '_util', '_virtinst', 'gettext', 'gettext_app', 'gettext_dir',
> 'osdict', 'util']
> Grepping for a version attribute in the installed virtinst code did not
> yield anything useful either so it seem that this attribute is indeed
> missing?
> And please avoid catch all exception checking.

In this case the catch all exception checking is doing what is intended.
If importing virtinst and checking __version__ fails for any reason, I'd
rather show an explicit error about the virtinst lib, rather than the
generic error dialog we raise for startup errors.

Sorry for the inconvenience,

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]