[GH-ISSUE #520] webvirtmgr import error #390

Closed
opened 2026-02-27 16:39:06 +03:00 by kerem · 3 comments
Owner

Originally created by @ryanennus on GitHub (Mar 9, 2015).
Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/520

I installed webvirtmgr following the instructions here: https://github.com/retspen/webvirtmgr/wiki/Install-WebVirtMgr

Everything went fine during the installation but when I run the server and visit the site on my browser the console would throw the ff error:

./manage.py runserver 0:8000
WARNING:root:No local_settings file found.
WARNING:root:No local_settings file found.
Validating models...

0 errors found
March 09, 2015 - 12:57:11
Django version 1.5.5, using settings 'webvirtmgr.settings'
Development server is running at http://0:8000/
Quit the server with CONTROL-C.
Internal Server Error: /
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 103, in get_response
resolver_match = resolver.resolve(request.path_info)
File "/usr/lib/python2.6/site-packages/django/core/urlresolvers.py", line 321, in resolve
sub_match = pattern.resolve(new_path)
File "/usr/lib/python2.6/site-packages/django/core/urlresolvers.py", line 223, in resolve
return ResolverMatch(self.callback, args, kwargs, self.name)
File "/usr/lib/python2.6/site-packages/django/core/urlresolvers.py", line 230, in callback
self._callback = get_callable(self._callback_str)
File "/usr/lib/python2.6/site-packages/django/utils/functional.py", line 31, in wrapper
result = func(*args)
File "/usr/lib/python2.6/site-packages/django/core/urlresolvers.py", line 97, in get_callable
mod = import_module(mod_name)
File "/usr/lib/python2.6/site-packages/django/utils/importlib.py", line 35, in import_module
import(name)
File "/var/www/webvirtmgr/servers/views.py", line 9, in
from vrtManager.hostdetails import wvmHostDetails
File "/var/www/webvirtmgr/vrtManager/hostdetails.py", line 5, in
from vrtManager.connection import wvmConnect
File "/var/www/webvirtmgr/vrtManager/connection.py", line 8, in
from vrtManager import util
File "/var/www/webvirtmgr/vrtManager/util.py", line 6, in
import libxml2
File "/usr/lib64/python2.6/site-packages/libxml2.py", line 1, in
import libxml2mod
ImportError: /usr/lib64/python2.6/site-packages/libxml2mod.so: undefined symbol: PyCapsule_CheckExact

I enabled debugging on settings.py and the browser will show this error:

ImportError at /

/usr/lib64/python2.6/site-packages/libxml2mod.so: undefined symbol: PyCapsule_CheckExact

Request Method: GET
Request URL: http://192.168.1.32:8000/
Django Version: 1.5.5
Exception Type: ImportError
Exception Value:

/usr/lib64/python2.6/site-packages/libxml2mod.so: undefined symbol: PyCapsule_CheckExact

Exception Location: /usr/lib64/python2.6/site-packages/libxml2.py in , line 1
Python Executable: /usr/bin/python
Python Version: 2.6.6
Python Path:

['/var/www/webvirtmgr',
'/usr/lib64/python26.zip',
'/usr/lib64/python2.6',
'/usr/lib64/python2.6/plat-linux2',
'/usr/lib64/python2.6/lib-tk',
'/usr/lib64/python2.6/lib-old',
'/usr/lib64/python2.6/lib-dynload',
'/usr/lib64/python2.6/site-packages',
'/usr/lib64/python2.6/site-packages/gtk-2.0',
'/usr/lib/python2.6/site-packages',
'/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg-info']

Your help would be very much appreciated. Thanks

Originally created by @ryanennus on GitHub (Mar 9, 2015). Original GitHub issue: https://github.com/retspen/webvirtmgr/issues/520 I installed webvirtmgr following the instructions here: https://github.com/retspen/webvirtmgr/wiki/Install-WebVirtMgr Everything went fine during the installation but when I run the server and visit the site on my browser the console would throw the ff error: ./manage.py runserver 0:8000 WARNING:root:No local_settings file found. WARNING:root:No local_settings file found. Validating models... 0 errors found March 09, 2015 - 12:57:11 Django version 1.5.5, using settings 'webvirtmgr.settings' Development server is running at http://0:8000/ Quit the server with CONTROL-C. Internal Server Error: / Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 103, in get_response resolver_match = resolver.resolve(request.path_info) File "/usr/lib/python2.6/site-packages/django/core/urlresolvers.py", line 321, in resolve sub_match = pattern.resolve(new_path) File "/usr/lib/python2.6/site-packages/django/core/urlresolvers.py", line 223, in resolve return ResolverMatch(self.callback, args, kwargs, self.name) File "/usr/lib/python2.6/site-packages/django/core/urlresolvers.py", line 230, in callback self._callback = get_callable(self._callback_str) File "/usr/lib/python2.6/site-packages/django/utils/functional.py", line 31, in wrapper result = func(*args) File "/usr/lib/python2.6/site-packages/django/core/urlresolvers.py", line 97, in get_callable mod = import_module(mod_name) File "/usr/lib/python2.6/site-packages/django/utils/importlib.py", line 35, in import_module __import__(name) File "/var/www/webvirtmgr/servers/views.py", line 9, in <module> from vrtManager.hostdetails import wvmHostDetails File "/var/www/webvirtmgr/vrtManager/hostdetails.py", line 5, in <module> from vrtManager.connection import wvmConnect File "/var/www/webvirtmgr/vrtManager/connection.py", line 8, in <module> from vrtManager import util File "/var/www/webvirtmgr/vrtManager/util.py", line 6, in <module> import libxml2 File "/usr/lib64/python2.6/site-packages/libxml2.py", line 1, in <module> import libxml2mod ImportError: /usr/lib64/python2.6/site-packages/libxml2mod.so: undefined symbol: PyCapsule_CheckExact I enabled debugging on settings.py and the browser will show this error: ImportError at / /usr/lib64/python2.6/site-packages/libxml2mod.so: undefined symbol: PyCapsule_CheckExact Request Method: GET Request URL: http://192.168.1.32:8000/ Django Version: 1.5.5 Exception Type: ImportError Exception Value: /usr/lib64/python2.6/site-packages/libxml2mod.so: undefined symbol: PyCapsule_CheckExact Exception Location: /usr/lib64/python2.6/site-packages/libxml2.py in <module>, line 1 Python Executable: /usr/bin/python Python Version: 2.6.6 Python Path: ['/var/www/webvirtmgr', '/usr/lib64/python26.zip', '/usr/lib64/python2.6', '/usr/lib64/python2.6/plat-linux2', '/usr/lib64/python2.6/lib-tk', '/usr/lib64/python2.6/lib-old', '/usr/lib64/python2.6/lib-dynload', '/usr/lib64/python2.6/site-packages', '/usr/lib64/python2.6/site-packages/gtk-2.0', '/usr/lib/python2.6/site-packages', '/usr/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg-info'] Your help would be very much appreciated. Thanks
kerem closed this issue 2026-02-27 16:39:06 +03:00
Author
Owner

@bsavelev commented on GitHub (Mar 12, 2015):

looks like you have at least 2 version of libxml2.so.2

try to check ldconfig -p |grep libxml2 that you have only one libxml2.so.2

<!-- gh-comment-id:78448242 --> @bsavelev commented on GitHub (Mar 12, 2015): looks like you have at least 2 version of libxml2.so.2 try to check `ldconfig -p |grep libxml2` that you have only one libxml2.so.2
Author
Owner

@ryanennus commented on GitHub (Mar 12, 2015):

libxml2.so.2 (libc6,x86-64) => /usr/lib64/libxml2.so.2

<!-- gh-comment-id:78453071 --> @ryanennus commented on GitHub (Mar 12, 2015): libxml2.so.2 (libc6,x86-64) => /usr/lib64/libxml2.so.2
Author
Owner

@ryanennus commented on GitHub (Jun 29, 2015):

SOLVED: i had my webvirtmgr running fine a long time ago, this post is overdue but i just want to share my solution to those who might need it.

it turned out i upgraded my libxml2 and libxml-python to version 2.9. apparently theres a bug with this version. i opted to roll back to 2.7.6-17 and webvirtmgr ran fine.

<!-- gh-comment-id:116605566 --> @ryanennus commented on GitHub (Jun 29, 2015): SOLVED: i had my webvirtmgr running fine a long time ago, this post is overdue but i just want to share my solution to those who might need it. it turned out i upgraded my libxml2 and libxml-python to version 2.9. apparently theres a bug with this version. i opted to roll back to 2.7.6-17 and webvirtmgr ran fine.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/webvirtmgr#390
No description provided.