Thanks for the response Mark. My results inline below:
mod = win32com.gencache.EnsureModule(...)
>
>>print mod
> ob = win32com.client.Dispatch(...)
>
>>ob
>>print ob
Traceback (most recent call last):
File "", line 1, in
File "c:\python26\lib\site-packages\win32com\client\dynamic.py", line 197,
in __str__
return str(self.__call__())
File "c:\python26\lib\site-packages\win32com\client\dynamic.py", line 182,
in __call__
return
self._get_good_object_(self._oleobj_.Invoke(*allArgs),self._olerepr_.defaultDispatchName,None)
pywintypes.com_error: (-2147319779, 'Library not registered.', None, None)
# convert from dynamic to makepy supported.
> ob = mod.GeneratedClassName(ob)
>
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'module' object has no attribute 'GeneratedClassName'
* When I try calling a known method on the returned COM object I get
>
>> an AttributeError
>>* I've also tried using every CLSID I can find in my skeleton file c
>> = Dispatch(CLSID) which results in either a "Class not registered"
>> or an object that also gives an AttributeError for a known method.
>>
>
> A traceback would be useful here - if the object really is a dynamic
> object, an AttributeError implies that the object itself also doesn't think
> the attribute exists (as dynamic objects ask the object for the attribute
> before raising an AttributeError).
>
I am calling a method listed in the gen_py file so I am not sure how the
attribute could not exist (I was careful about capitalization. I can
post/send a very abbreviated version of this file (just the wrapper stuff
and a single method) if it would help.
Thanks!
-brian
___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32