[Qgis-developer] QtSQL location has moved PySide

Alex Mandel tech_dev at wildintellect.com
Thu Oct 25 18:54:08 PDT 2012


On some OS it looks like the location of the python bindings to qtsql
has moved and is causing any plugin that imports to fail.

Specifically on ubuntu 12.04 and newer it's inside pyside. I'm not sure
if this affects other systems (Win/Mac). So it might be advised for
plugin authors to do an if statement or a try/except to catch the right
load.

Old:
from PyQt4.QtSql import *

New:
from PySide.QtSql import *


Quick hack to get them working, on your system if you need the plugins
to work and can't wait for them to be fixed upstream. In you
/home/user/.qgis/python/plugins folder run
find . -name "*.py" -exec sed -i -e "s/PyQt4.QtSql/PySide.QtSql/g" {} \;

Thanks,
-- 
Alex Mandel

Geography Graduate Group
http://geography.ucdavis.edu
Information Center for the Environment (ICE)
http://ice.ucdavis.edu
University of California, Davis


More information about the Qgis-developer mailing list