Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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
hon\plugins\PointRadius\ui_pointradius.ui"
Traceback (most recent call last):
  File "C:\Python25\lib\site-packages\PyQt4\uic\port_v2\invoke.py", line 44, in
invoke
    exit_status = driver.invoke()
  File "C:\Python25\lib\site-packages\PyQt4\uic\driver.py", line 69, in invoke
    self._generate()
  File "C:\Python25\lib\site-packages\PyQt4\uic\driver.py", line 103, in _genera
te
    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

Thanks.

Sincerely, ST

Image attached below:

share|improve this question
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. –  MerseyViking May 25 '11 at 20:30
2  
Have you tried using an OSGeo4W install? –  underdark May 25 '11 at 21:15
    
@MerseyViking. I was afraid of that. I will stick to GIS specific questions from next time. –  nerazzurri_4 May 25 '11 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 –  nerazzurri_4 May 25 '11 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. May 26 '11 at 0:42
show 2 more comments

1 Answer

up vote 2 down vote accepted

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

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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