I tried to dig a little further in this, but with no success.<br>I can import the module with no problem and I can&#39;t replicate the error outside of the COM object.<br><br>If I run in pythonWin the following lines<br><br>
&gt;&gt;&gt; from win32com.server.policy import _import_module<br>&gt;&gt;&gt; a= _import_module(&#39;scikits.timeseries.cseries&#39;)<br>&gt;&gt;&gt; a<br>&lt;module &#39;scikits.timeseries.cseries&#39; from &#39;C:\Appl\Python27\lib\site-packages\scikits.timeseries-0.91.3-py2.7-win32.egg\scikits\timeseries\cseries.pyd&#39;&gt;<br>
<br>I do not get any error. Matt Knox suggested it could have something to do with threading, but even calling CoInitialize before importing the scikits.timeseries module does not solve the problem.<br><br>Why would &#39;cseries&#39; fail to load only when used though the com interface?<br>
<br>Any help?<br><br><div class="gmail_quote">On Thu, Jan 27, 2011 at 12:15 AM, Mark Hammond <span dir="ltr">&lt;<a href="mailto:skippy.hammond@gmail.com">skippy.hammond@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On 24/01/2011 11:30 PM, Mauro wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hello,<br>
<br>
I get the following error when importing Date from scikits.timeseries.<br>
The error is there only when I interface python with Excel using COM. It<br>
is enough to import anything from scikits.timeseries to get the error.<br>
<br>
Any help?<br>
I am using Python2.7 and scikits.timeseries-0.91.3<br>
</blockquote></div>
...<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
&quot;C:\Appl\Python27\lib\site-packages\scikits.timeseries-0.91.3-py2.7-win32.egg\scikits\timeseries\const.py&quot;,<br>
line 79, in &lt;module&gt;<br>
     from cseries import freq_constants<br>
ImportError: DLL load failed: A dynamic link library (DLL)<br>
initialization routine failed.<br>
pythoncom error: Python error invoking COM method.<br>
</blockquote>
<br></div>
This is the root of your problem - the &#39;cseries&#39; module, which appears to be part of the timeseries package, has failed to load.  You probably need to talk to whoever provides that module.<br>
<br>
HTH,<br><font color="#888888">
<br>
Mark<br>
</font></blockquote></div><br>