pythoncom on Windows Server 2008

Nairn, Bruce Bruce.Nairn at kingcounty.gov
Tue Nov 29 19:12:54 EST 2011


Hi,

  I'm trying to move some code to a Windows Server 2008 machine.  It runs on Windows 7 and XP, but fails on Windows Server 2008.  The python installation is seemingly identical (python 2.6.4, 32 bit).  The following replicates the problem:

import pythoncom
IDispatch = pythoncom.CoCreateInstance ('OPC.Automation', None, pythoncom.CLSCTX_SERVER, pythoncom.IID_IDispatch)

On Windows 7 x64 or Windows XP x32:

this returns an PyIDispatch object

On Windows Server 2008 x64 this gives:

com_error: (-2147221005, 'Invalid class string', None, None)

Any suggestions would be appreciated!

Bruce Nairn
King County Wastewater Treatment Division
201 S Jackson St., KSC-NR-0503
Seattle, WA, 98104-3855
206-263-3693
email: bruce.nairn at kingcounty.gov<mailto:bruce.nairn at kingcounty.gov>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20111129/3aefcad6/attachment.html>


More information about the Python-list mailing list