This is my first question so please go easy. I am trying to develop a Plugin for QGIS. I made my plugin using the "plugin builder", then compiled the .qrc and .ui files with PySide-rcc.exe and PySide.uic.py respectively. This all seems satisfactory.
However, my first problem arises when the plugin loads as the QGIS and Python (PySide) libraries are not in the same place.
ImportError: No module named PySide
I resolved this by adding a reference to the PySide path at the start of the compiled .ui module:
Import sys
Sys.path.append("C:\\Python27\\Lib\\site-packages")
Unfortunately when I run it again I get the critical error:
ImportError: DLL load failed: %1 is not a valid Win32 application.
Google searches are leading me to believe that this is caused by an incompatibility between 32bit and 64bit modules, however, I cannot easily download different versions as they are supplied under my companies IS policy.
This seems to apply to all the QGIS modules as i can not access any modules even from the python console:
>>> import sys
>>> sys.path.append("C:/Program Files (x86)/Quantum GIS Lisboa/apps/qgis/python")
>>> for path in sys.path:
print path
C:\Windows\system32
C:\Python27\Scripts
D:\HRW\VET\HrwPyLibs
D:\HRW\VET\HrwPyLibs\Xdmf
D:\HRW\VET\HrwPyLibs\Converters
C:\Python27\python27.zip
C:\Python27\DLLs
C:\Python27\lib
C:\Python27\lib\plat-win
C:\Python27\lib\lib-tk
C:\Python27
C:\Python27\lib\site-packages
C:\Python27\lib\site-packages\PIL
C:\Python27\lib\site-packages\win32
C:\Python27\lib\site-packages\win32\lib
C:\Python27\lib\site-packages\Pythonwin
C:/Program Files (x86)/Quantum GIS Lisboa/apps/qgis/python
>>> from qgis.core import QgsFeatures
Traceback (most recent call last):
File "<pyshell#5>", line 1, in <module>
from qgis.core import QgsFeatures
ImportError: DLL load failed: %1 is not a valid Win32 application.
Has anyone else experienced this problem or is there an obvious issue that i have not noticed?
Thanks,
Chris
Running: Windows 7 (64bit), Python 2.7.2 (64bit), QGIS 1.8.0 (???)