Bob Gailer
2006-12-29 00:20:16 UTC
I'm running this under my Apache2triad mod_python installation.
Yesterday it was working. Today it is not.
In the Apache config mptest.py is defined as the request handler. When
called via an HTTP request I get the following:
Traceback (most recent call last):
File "H:\Python24\Lib\site-packages\mod_python\apache.py", line 299,
in HandlerDispatch
result = object(req)
File "H:/apache2triad/htdocs/output/mptest.py", line 45, in handler
if actHandler: actHandler(req, parameters)
File "H:/apache2triad/htdocs/output/mptest.py", line 52, in search
connect()
File "H:/apache2triad/htdocs/output/mptest.py", line 26, in connect
conn = win32com.client.Dispatch("ADODB.Connection")
File "H:\Python24\lib\site-packages\win32com\client\__init__.py", line
95, in Dispatch
dispatch, userName =
dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)
File "H:\Python24\lib\site-packages\win32com\client\dynamic.py", line
98, in _GetGoodDispatchAndUserName
return (_GetGoodDispatch(IDispatch, clsctx), userName)
File "H:\Python24\lib\site-packages\win32com\client\dynamic.py", line
78, in _GetGoodDispatch
IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx,
pythoncom.IID_IDispatch)
com_error: (-2147221008, 'CoInitialize has not been called.', None, None)
Trying the same thing in the PythonWin interactive window - it works
just fine.
Yesterday it was working. Today it is not.
In the Apache config mptest.py is defined as the request handler. When
called via an HTTP request I get the following:
Traceback (most recent call last):
File "H:\Python24\Lib\site-packages\mod_python\apache.py", line 299,
in HandlerDispatch
result = object(req)
File "H:/apache2triad/htdocs/output/mptest.py", line 45, in handler
if actHandler: actHandler(req, parameters)
File "H:/apache2triad/htdocs/output/mptest.py", line 52, in search
connect()
File "H:/apache2triad/htdocs/output/mptest.py", line 26, in connect
conn = win32com.client.Dispatch("ADODB.Connection")
File "H:\Python24\lib\site-packages\win32com\client\__init__.py", line
95, in Dispatch
dispatch, userName =
dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)
File "H:\Python24\lib\site-packages\win32com\client\dynamic.py", line
98, in _GetGoodDispatchAndUserName
return (_GetGoodDispatch(IDispatch, clsctx), userName)
File "H:\Python24\lib\site-packages\win32com\client\dynamic.py", line
78, in _GetGoodDispatch
IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx,
pythoncom.IID_IDispatch)
com_error: (-2147221008, 'CoInitialize has not been called.', None, None)
Trying the same thing in the PythonWin interactive window - it works
just fine.
--
Bob Gailer
510-978-4454
Bob Gailer
510-978-4454