[Qgis-developer] HELP!! DLL not found when importing qgis.core and qgis.gui

motta.luiz at gmail.com motta.luiz at gmail.com
Thu Oct 8 15:34:01 EDT 2009


Angelica,

I make the plugin for QGis, before, it is a python program used PyQT4 and binding GDAL.

For test and debug by IDE PyScripter, i call the same package alone, i.e, out of QGis.
The same sources i copy and put out of folder for plugin´s and run the main python file (_run_OUT_QGis.py).

You can ready the source and make adaptations for your work.

The plugin´s is 'Image Boundary' in 'http://pyqgis.org/repo/contributed'

The _run_OUT_QGis.py:
------------
import sys

from PyQt4 import QtGui

from imgboundary_dlg import ImgBoundaryDialog

app = QtGui.QApplication(sys.argv)

dlg = ImgBoundaryDialog()
dlg.show()


sys.exit(app.exec_())
------------ 


Good luck!

Echavarria Gregory, Maria Angelica escreveu:
> Dear QGIS group, I posted to the users mailing list but they advised me to ask the developers... so here is my question:
>
> I have my application designed in PyQt and need to add a Qgis canvas to it. I followed the user guide ch. 12 to add things and convert my app into a PyQGIS application. Everything used to work fine in my PyQt4 and PyWin32 installation. Last night I installed the binaries of QGIS 1.0, then added the recommended environment variables (PATH, PYTHONPATH, QGISHOME) to my system, and now this is what my Pythonwin editor complaints about:
>
>   
>>>> import qgis
>>>> import PyQt4
>>>> from qgis.core import *
>>>>         
> Traceback (most recent call last):
>   File "<interactive input>", line 1, in <module>
> ImportError: DLL load failed: The specified module could not be found.
>   
>>>> from qgis.gui import *
>>>>         
> Traceback (most recent call last):
>   File "<interactive input>", line 1, in <module>
> ImportError: DLL load failed: The specified module could not be found.
>   
>>>> from PyQt4.QtCore import *
>>>>         
> Traceback (most recent call last):
>   File "<interactive input>", line 1, in <module>
> ImportError: DLL load failed: The specified procedure could not be found.
>   
>
> I think the DLL existed before the QGIS installation because the PyQt4.QtCore install used to work perfect!!. Also seems to be the exact same DLL what is missing in both cases (PyQt and QGIS imports). Could someone give me a hand with this? I'M STUCKED!!! If you happen to know which is the missing DLL, could you please email it to me along with the location?
>
> Maybe it has something to do with the environmet variables?
> Could it be because Python is also inside the binary distribution and I'm using my usual 'alone' installation? Or is it Windows?
>
> Thanks very much,
> Angelica
>
> M. Angelica Echavarria-Gregory,
> Ph.D Candidate
> University of Miami
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>   



More information about the Qgis-developer mailing list