I tried to dig a little further in this, but with no success.
I can import the module with no problem and I can't replicate the error
outside of the COM object.

If I run in pythonWin the following lines

>>> from win32com.server.policy import _import_module
>>> a= _import_module('scikits.timeseries.cseries')
>>> a
<module 'scikits.timeseries.cseries' from
'C:\Appl\Python27\lib\site-packages\scikits.timeseries-0.91.3-py2.7-win32.egg\scikits\timeseries\cseries.pyd'>

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.

Why would 'cseries' fail to load only when used though the com interface?

Any help?

On Thu, Jan 27, 2011 at 12:15 AM, Mark Hammond <skippy.hamm...@gmail.com>wrote:

> On 24/01/2011 11:30 PM, Mauro wrote:
>
>> Hello,
>>
>> I get the following error when importing Date from scikits.timeseries.
>> The error is there only when I interface python with Excel using COM. It
>> is enough to import anything from scikits.timeseries to get the error.
>>
>> Any help?
>> I am using Python2.7 and scikits.timeseries-0.91.3
>>
> ...
>
>
> "C:\Appl\Python27\lib\site-packages\scikits.timeseries-0.91.3-py2.7-win32.egg\scikits\timeseries\const.py",
>> line 79, in <module>
>>     from cseries import freq_constants
>> ImportError: DLL load failed: A dynamic link library (DLL)
>> initialization routine failed.
>> pythoncom error: Python error invoking COM method.
>>
>
> This is the root of your problem - the 'cseries' module, which appears to
> be part of the timeseries package, has failed to load.  You probably need to
> talk to whoever provides that module.
>
> HTH,
>
> Mark
>
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to