473,408 Members | 1,876 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

win32com typelib difficulty

Software versions:
Python - 2.3.3
win32all extensions - build 163
OS- Win2000 SP4

I am having trouble in accessing a customer's proprietary COM type library.
After running makepy against the customer's typelib, I am still unable to
create a typed object, getting the following Python traceback (I have to
sanitize the customer's product, I have replaced it with XYZ):

Python 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
import win32com.client
xyz = win32com.client.Dispatch("XYZApp") Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "C:\Python23\lib\site-packages\win32com\client\__init__.py", line 95,
in Dispatch
dispatch, userName =
dynamic._GetGoodDispatchAndUserName(dispatch,userN ame,clsctx)
File "C:\Python23\lib\site-packages\win32com\client\dynamic.py", line 84,
in _GetGoodDispatchAndUserName
return (_GetGoodDispatch(IDispatch, clsctx), userName)
File "C:\Python23\lib\site-packages\win32com\client\dynamic.py", line 72,
in _GetGoodDispatch
IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx,
pythoncom.IID_IDispatch)
pywintypes.com_error: (-2147467262, 'No such interface supported', None,
None) xyz = win32com.client.Dispatch("XYZ")
xyz <COMObject XYZ> xyz._print_details_() AxDispatch container XYZ
Methods:
Props:
Get Props:
Put Props:

If xyz is a <COMObject XYZ>, how do I invoke methods on it? I've already
tried the straightforward xyz.method1() call, and in this case I get:

Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "C:\Python23\lib\site-packages\win32com\client\dynamic.py", line 477,
in __getattr__
raise AttributeError, "%s.%s" % (self._username_, attr)
AttributeError: XYZ.method1

although I know that method1() is defined for this interface.
Any other suggestions on how to proceed with this TLB? I *really* want to
be able to write test scripts in Python, not in VB.

-- Paul


Jul 18 '05 #1
0 1880

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: RJ | last post by:
Hi, I've been going over the Quick Start to Client side COM and Python and many other sources, but cannot find an example that will get my com/ActiveX .ocx USB device driver imported. The Excel...
3
by: Peter Sparago | last post by:
(Sorry in advance for the long post.) Hi, I'm having a great deal of difficulty buiding a Python COM extension. I am using the MSHTML ActiveX control in my application but I need to interact...
1
by: Tom Willis | last post by:
Just a general question. It seems in COM late binding is something that should be avoided if possible. Because python seems to be really good at doing thing dynamically I'm wondering why no...
2
by: list.repository | last post by:
Problem: Works fine when running python test.py but fails when executing test.exe. test.py: conn = win32com.client.gencache.EnsureDispatch('ADODB.Connection')...
2
by: Sibylle Koczian | last post by:
Hello, I've installed Python 2.4 and the win32 extensions, using administrator rights, under Windows XP in "C:\Programme". As this is a directory without spaces I didn't expect any problems. But...
4
by: John Salerno | last post by:
Is there anything better to read on how to use this module for working with Office programs? This is not very heartening to read in the official docs: ----------------------- How do I know...
1
by: bli | last post by:
I have been developing an application driving a device through COM. I used win32com (brilliant ) and was at a fairly advanced stage being able to access the functions of the device and access/...
11
by: Bill Davy | last post by:
I am trying to edit Contacts in Outlook. This is so I can transfer numbers from my address book which is an Excel spreadsheet to my mobile phone. I came across the following snippet of code which...
4
by: sterling | last post by:
I'm curious as to why the difference between IDLE and pythonWin when using win32com. opening an excel file, i've attempted to grab the chart information out of the file. commands like co =...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.