Problem calling COM Object written in Python

rgb122 at my-deja.com rgb122 at my-deja.com
Thu Apr 6 15:07:14 EDT 2000


I have a COM object I wrote in Python that needs to be called from an
ASP script (VBScript). I can create the object just fine, but then when
I try to call a method on it:

Python COM Server Internal Error error '80004005'

Unexpected Python Error: exceptions.TypeError: Objects for SAFEARRAYS
must be sequences (of sequences), or a buffer object.

The COM object is a pretty simple wrapper for a Python class. It's got
one factory method that takes a string as a parameter

import Publisher

class PublisherCOM:

	_public_methods_ = ['loadSite']
	_reg_progid_ = "ECS.Publisher"
	_reg_clsid_ = "{5E633A5D-D0BA-40A4-B30D-54F7B29CCD23}"

	def loadSite (self, filename):

		print "I'm here\n"
		print str(filename)

		site = Publisher.loadSite(str(filename))
		return site

The PythonWin Trace Collector gives this friendly output:

Object with win32trace dispatcher created (object=None)
in _GetDispID_ with LoadSite 8
in _InvokeEx_ with 1000 1033L 3
(L'D:\\rbender\\Desktop\\pyTemplate\\brands.xml',) None
<PyIServiceProvider at 0x210ebfc with obj at 0x202f130>

Is there some sort of problem passing the string as a parameter? I'm
running this under Win2000, so perhaps there's a lovely new "feature"
that's cropped up.

Any and all help is much appreciated. Thanks!

-Rob Bender


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list