[python-win32] Problem with win32com and scikits timeseries
Mark Hammond
skippy.hammond at gmail.com
Mon Jan 31 23:08:03 CET 2011
As a work-around, try doing the problematic import in the top-level of
the module rather than in a method.
HTH,
Mark
On 29/01/2011 3:15 AM, Mauro wrote:
> 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.hammond at gmail.com
> <mailto:skippy.hammond at 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 at python.org
> http://mail.python.org/mailman/listinfo/python-win32
More information about the python-win32
mailing list