eclipse pywintypes.com_error
Tim Golden
mail at timgolden.me.uk
Fri Dec 7 08:59:40 EST 2007
gurkan wrote:
> i have treid the script :
>
> #import active_directory
> import win32com.client
>
> win32com.client.Dispatch ("ADODB.Command")
> #me = active_directory.find_user ()
>
> #print me
>
> again i got the error :
>
> Traceback (most recent call last):
> File "H:\dev\eclipse\workspace\pyProject\src\pyPackage
> \adDeneme3.py", line 4, in <module>
> win32com.client.Dispatch ("ADODB.Command")
> File "E:\Python25\Lib\site-packages\win32com\client\__init__.py",
> line 95, in Dispatch
> dispatch, userName =
> dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)
> File "E:\Python25\Lib\site-packages\win32com\client\dynamic.py",
> line 98, in _GetGoodDispatchAndUserName
> return (_GetGoodDispatch(IDispatch, clsctx), userName)
> File "E:\Python25\Lib\site-packages\win32com\client\dynamic.py",
> line 78, in _GetGoodDispatch
> IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx,
> pythoncom.IID_IDispatch)
> pywintypes.com_error: (-2147024770, 'The specified module could not be
> found.', None, None)
I don't think it's that the CoCreateInstance can't be found:
that's a COM error you're seeing and it means that the
IDispatch mechanism can't find the "ADODB.Command" you're
looking for. If I get the chance I'll try to find a Vista
machine to find out what the equivalent is. If anyone on
the list has Vista and/or knows what the score is here,
please let me know.
To double-check, Gurkan, could you open the Registry and
browse to HKEY_CLASSES_ROOT and look for a key ADODB.Command.
I presume it's not present.
TJG
More information about the Python-list
mailing list