I tried following the steps to build a python plugin for QGIS. (step 3 is where I am stuck at)

1) I used the Plugin Builder plugin to build the initial set of files. I call my plugin "PointWithinRadius". After using the plugin builder I have the files: init.py, pointwithinradius.py, resources.qrc, etc..(the usual files)

2) Next I ran pyrcc4.exe and was able to get resource.py from resource.qrc

3) Tried running pyuic4.bat as follows: (but get the errors as seen below)

![C:\Program Files\Quantum GIS Copiapo\bin>pyuic4.bat -d -o "C:\Users\stalmaki\.qg
is\python\plugins\PointRadius\ui_pointradius.py" -x "C:\Users\stalmaki\.qgis\pyt
Traceback (most recent call last):
  File "C:\Python25\lib\site-packages\PyQt4\uic\port_v2\invoke.py", line 44, in
    exit_status = driver.invoke()
  File "C:\Python25\lib\site-packages\PyQt4\uic\driver.py", line 69, in invoke
  File "C:\Python25\lib\site-packages\PyQt4\uic\driver.py", line 103, in _genera
    self._opts.pyqt3_wrapper, self._opts.from_imports)
AttributeError: Values instance has no attribute 'from_imports'][1]

I am unable to figure out the reason for this and searching for this error didn't give me much success either.

Finally when I try opening my plugin in QGIS, I get the following (see attached screenshot jpeg)

I want to build a sort of hello world plugin at first but these errors are not allowing me to get out of the starting blocks. Any help on solving would be great.

My development environment: Windows 7 32 bit QGIS 1.6.0 Python 2.5 Qt 4.7

enter image description here

  • 1
    This is more of a development question than a GIS one, so you might want to ask it on the qgis-dev mailing list. Commented May 25, 2011 at 20:30
  • 2
    Have you tried using an OSGeo4W install?
    – underdark
    Commented May 25, 2011 at 21:15
  • @MerseyViking. I was afraid of that. I will stick to GIS specific questions from next time. Commented May 25, 2011 at 22:33
  • @underdark I installed QGIS as an independent binary as I already had Python 2.5 installed. Does using OSGeo4W take care of some of the other linking and PATH issues that are known to crop up? Thanks Commented May 25, 2011 at 22:34
  • 3
    @nerazzurri_4; instead of changing the title to Solved you could use the "Answer Your Question" option which is indeed recommended.
    – Chethan S.
    Commented May 26, 2011 at 0:42

1 Answer 1


Using OSGeo4W should take care of the PATH issues on Windows systems and keep all packages compatible.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.