Using comtypes on 64-bit Python, I get the following error:

 

Python 2.6.2 (r262:71605, Apr 14 2009, 22:46:50) [MSC v.1500 64 bit (AMD64)]
on win32

Type "help", "copyright", "credits" or "license" for more information.

>>> import comtypes; comtypes.__version__

'0.6.0.2dev'

>>> from comtypes.client import *

>>> app = CreateObject('Excel.Application')

# Generating comtypes.gen._00020813_0000_0000_C000_000000000046_0_1_6

# Generating comtypes.gen._00020430_0000_0000_C000_000000000046_0_2_0

# Generating comtypes.gen.stdole

# Generating comtypes.gen._2DF8D04C_5BFA_101B_BDE5_00AA0044DE52_0_2_4

# Generating comtypes.gen.Office

# Generating comtypes.gen._0002E157_0000_0000_C000_000000000046_0_5_3

# Generating comtypes.gen.VBIDE

# Generating comtypes.gen.Excel

>>> app.Workbooks.Open('foo')

Traceback (most recent call last):

  File "<stdin>", line 1, in <module>

_ctypes.COMError: (-2147352568, 'Bad variable type.', (None, None, None, 0,
None))

 

If I use 32-bit Python or if I use pywin32 win32com.client.Dispatch on
64-bit Python, everything behaves as expected (it opens the file or throws
an error saying it can't find the file).  I've tried passing u'foo' instead,
but it throws the same error.

 

Any suggestions?

Attachment: smime.p7s
Description: S/MIME cryptographic signature

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
comtypes-users mailing list
comtypes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/comtypes-users

Reply via email to