<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7651.14">
<TITLE>Fail loading .pyd file</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Arial">Hi Everyone,</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I'm writing a python plugin that is going to integrate som functionallity from OPALS [1], but I am having trouble loading the Opals python module in Qgis. It will find the __init__.py file of the module, but then fail to load the first .pyd file. The same thing is happening if I try to import opals in the Qgis python console. The error I get is this:</FONT></P>

<P><I><FONT SIZE=2 FACE="Arial">>>>import opals</FONT></I>
</P>

<P><I><FONT SIZE=2 FACE="Arial">Traceback (most recent call last):</FONT></I>

<BR><I><FONT SIZE=2 FACE="Arial">    File "<input>", line 1, in <module></FONT></I>

<BR><I><FONT SIZE=2 FACE="Arial">    File "C:/OSGeo4W/apps/qgis/./python\qgis\utils.py", line 309, in _import</FONT></I>

<BR><I><FONT SIZE=2 FACE="Arial">        mod = _builtin_import(name, globals, locals, fromlist, level)</FONT></I>

<BR><I><FONT SIZE=2 FACE="Arial">    File "C:\Opals\opals\__init__.py", line 16, in <module></FONT></I>

<BR><I><FONT SIZE=2 FACE="Arial">        from . import _Exceptions as Exceptions</FONT></I>

<BR><I><FONT SIZE=2 FACE="Arial">    File "C:/OSGeo4W/apps/qgis/./python\qgis\utils.py", line 309, in _import</FONT></I>

<BR><I><FONT SIZE=2 FACE="Arial">        mod = _builtin_import(name, globals, locals, fromlist, level)</FONT></I>

<BR><I><FONT SIZE=2 FACE="Arial">ImportError: DLL load failed: The specified procedure could not be found.</FONT></I>
</P>

<P><FONT SIZE=2 FACE="Arial">The opals module works just fine with every other python installation I've tried, even OSGeo4W and other 2.7.3 installations. I'm sure PYTHONPATH is set correct, as it finds __init__.py and only stops at the  _Exceptions.pyd file. I'm running these versions:</FONT></P>

<P><I><FONT SIZE=2 FACE="Arial">Python version:<BR>
2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)]<BR>
<BR>
<BR>
QGIS version:<BR>
1.8.0-Lisboa Lisboa, f440b60</FONT></I>
</P>

<P><FONT SIZE=2 FACE="Arial">Does anyone know what causes this fail to happen in Qgis?</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Regards.</FONT>

<BR><FONT SIZE=2 FACE="Arial">Henning</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">[1] </FONT><A HREF="http://www.ipf.tuwien.ac.at/opals/html/index.html"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">http://www.ipf.tuwien.ac.at/opals/html/index.html</FONT></U></A>
</P>

</BODY>
</HTML>