using com object written in python from iis/asp 
Author Message
 using com object written in python from iis/asp

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'.

Can anybody help me ???

Greetings, Uwe

--
Dr. rer. nat. Uwe Schmitt      Computer science is no more about Computers,

http://www.*-*-*.com/          



Mon, 16 May 2005 00:07:30 GMT  
 using com object written in python from iis/asp

Quote:

> 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.



Mon, 16 May 2005 06:26:56 GMT  
 using com object written in python from iis/asp

Quote:


>> 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

> 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.

Yes, you're right, it's on a network path. I'll try it tomorow.

Greetings, Uwe.

--
Dr. rer. nat. Uwe Schmitt      Computer science is no more about Computers,

http://www.procoders.net          



Mon, 16 May 2005 07:16:33 GMT  
 using com object written in python from iis/asp

Quote:



>>> 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

>> 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.
> Yes, you're right, it's on a network path. I'll try it tomorow.

Well, I tried it, and it works for the py2exe version  of the server.

BUT: If I use the script-version of the com-server I get

    Warning: Unable to obtain IDispatch interface for CLSID
    {D0940C70-C0B8-42C9-A542-2587D8F9190D}: ClassFactory kann angeforderte Klasse
    nicht liefern in c:\inetpub\wwwroot\com.php on line 4

That is the CLSID of my script server. Again python clients can access
the server...

Greetings, Uwe.

--
Dr. rer. nat. Uwe Schmitt      Computer science is no more about Computers,

http://www.procoders.net          



Mon, 16 May 2005 21:10:11 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Using COM constants on under IIS ASP.

2. ideal architecture for Python/IIS/ASP/COM?

3. Object Rexx on IIS using CGI and ASP

4. Accessing ASP-IIS objects in modules

5. IIS hangs when using Topspeed ODBC with Active Server Pages (ASP)

6. Solution: using the FieldStorage in .asp pages under IIS

7. ASP Type of Functioniality using TCL and IIS 4.0

8. IIS ASP Python 2.2 script works first time only

9. Python, ASP/IIS, KeyboardInterrupt

10. config for Python as the IIS hosted ASP script Lang

11. connect to IIS and debug ASP with python????

12. IIS + ASP + <#@Language=Python#>== performance_hit

 

 
Powered by phpBB® Forum Software