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 am working on Python plugins for QGIS. I set my variables as

PATH :=C:\OSGeo4W\apps\qgis;%PATH% PYTHONPATH:=C:\OSGeo4W\apps\qgis\python

But when I try to run my .py file in IDLE I get an error saying:

Traceback (most recent call last):

File "C:\rt_sql_layer_working\DlgQueryBuilder.py", line 30, in from qgis.core import * ImportError: DLL load failed: The specified module could not be found.

What should I set for the PATH variable??

share|improve this question
    
Have you/is the dll registered? –  Hairy Jan 25 '12 at 11:06
add comment

1 Answer

OK, looking at this logically, I would say you are missing a dll, or one is not registered. From our good friends over at stackoverflow, I have found using Dependency Walker as good a utility as you can find for working out precisely what your project is using, and, more importantly, what it wants to use and cannot find.

Run it and look at the outputs. If it still doesn't make sense, post the results here and we can look at them. It will be a missing/unregistered dll, if I were a gambling man.

share|improve this answer
1  
ok..actually its a mistmatch between the versions..i gets this error for from qgis.core import * that: RuntimeError: the PyQt4.QtCore module is version 1 but the qgis.core module requires version -1 –  Poonam Narvekar Jan 25 '12 at 12:05
    
This appears to be a bug - Can you post the full trace? –  Hairy Jan 25 '12 at 13:04
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.