using com object written in python from iis/asp

Mark Hammond mhammond at skippinet.com.au
Wed Nov 27 17:26:56 EST 2002


Uwe Schmitt wrote:
> Hi,
> 
> I wrote a python script for the implementation of a
> com server. If I use a python script as client, everything
> is o.k. But if I try to contact the com object from an ASP 
> script, I get:
> 
>    Python COM Server Internal Error- Fehler '80004002' 
> 
>    Unexpected Python Error: exceptions.ImportError: No module named com_planefit 
> 
> due to the "--debug" option I get further information:
> 
>     Object with win32trace dispatcher created (object=None)
>     Traceback (most recent call last):
>       File "C:\Python22\Lib\site-packages\win32com\server\dispatcher.py", line 27, in _CreateInstance_
> 	self.policy._CreateInstance_(clsid, reqIID)
>       File "C:\Python22\Lib\site-packages\win32com\server\policy.py", line 199, in _CreateInstance_
> 	myob = call_func(classSpec)
>       File "C:\Python22\Lib\site-packages\win32com\server\policy.py", line 634, in call_func
> 	return apply(resolve_func(spec), args)
>       File "C:\Python22\Lib\site-packages\win32com\server\policy.py", line 623, in resolve_func
> 	module = _import_module(mname)
>       File "C:\Python22\Lib\site-packages\win32com\server\policy.py", line 642, in _import_module
> 	  __import__(mname)
>     ImportError: No module named com_planefit
> 
> The COM object is registered as 'PlaneFit', the serverscript is named 'com_planefit.py'.

If com_planefit.py is on a network path, this could be your problem. 
COM objects run by IIS are run under the LocalSystem user, not your 
current user.  This is almost always the underlying reason for such 
problems.

Mark.




More information about the Python-list mailing list