473,387 Members | 3,810 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,387 software developers and data experts.

pythoncom.connect()

Dear,

I have problems when I get the IDispatch with pythoncom.connect().
When I called the 'Excel.Application' with it, it worked. (At least I can
see the pythoncom.connect() is working for the well-designed COM like
Excel.)
When I called my COM module which was derived from IDispatch interface,
the pythoncom.connect() issued error like
com_error: (-2147221021, 'Operation unavailable', None, None).

Was my COM module badly desinged? This COM worked well with VB.
Is there anybody who solved this kind of problems?

I alse tried using the gencache.EnsureModule() after I generate a static COM
file with makepy.
In this way, I got the member function not available errors.

Thank you.

- john

Jul 18 '05 #1
2 5945
"John J. Lee" <jj***@lbl.gov> writes:

Not another one! And there was I thinking my "J." made me safe from
namespace clashes... :-(

I have problems when I get the IDispatch with pythoncom.connect().
When I called the 'Excel.Application' with it, it worked. (At least I can
see the pythoncom.connect() is working for the well-designed COM like
Excel.)
When I called my COM module which was derived from IDispatch interface,
the pythoncom.connect() issued error like
com_error: (-2147221021, 'Operation unavailable', None, None).

[...]

Do you know about win32com.client.Dispatch and friends? Why are you
calling pythoncom.connect()?
John
Jul 18 '05 #2
"John J. Lee" wrote:

"John J. Lee" <jj***@lbl.gov> writes:

Not another one! And there was I thinking my "J." made me safe from
namespace clashes... :-(


Better switch to the Java approach then, Mr. com.pobox.lee.j.john ...

-Peter
Jul 18 '05 #3

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

Similar topics

3
by: Paul | last post by:
Hi I'm trying to build a standalone COM exe server using Python 2.2 + Mark Hammond's windows extensions + Py2Exe. I've built the example linked on the Py2Exe homepage and get this error when...
0
by: Ashley | last post by:
I have quite a few COM servers implemented using Visual C++ 6.0 and I'm having trouble accessing all of them via Python. The problem is with the default being set to pythoncom.Empty while my...
5
by: Brian Hlubocky | last post by:
I'm have a fairly simple (in terms of COM) python program that pulls info from an Access database and creates Outlook contacts from that information. It uses wxPython for gui and works without...
0
by: gloom | last post by:
Hey, I'm programming something with NeroSDK COM module, and I bumped into a problem: why doesn't python releases and uninitializes COM objects that are no longer referenced? Here is a sample...
0
by: Olaf Meding | last post by:
How does Python (version 23 on Windows) know what to import? I could not find a file or directory named "pythoncom". import pythoncom help(pythoncom) FILE c:\windows\system32\pythoncom23.dll...
1
by: fraca7 | last post by:
Hello. I got a little problem while using pythoncom to automate IE; for some reason, changing the 'selectedIndex' on an instance of IHTMLSelectElement doesn't fire the 'onchange' event (I guess...
0
by: ChristianHahn | last post by:
Hi, I inherited a piece of code, that doesn't work anymore. It's a COM-object. One interface method opens a modal dialog ( OpenDialog() ), with the other methods one can set the values for a...
6
by: gcmartijn | last post by:
H! I using a script that opens a internet page in a small window (what I can control) In XP everything was working fine, but now I'm using Vista with IE7 and this is what happends now: First...
0
by: Gabriel Genellina | last post by:
En Wed, 27 Aug 2008 21:17:22 -0300, Vistro <vistro@vistro.netescribi�: Reinstalling the pywin32 package should fix that, I presume. In fact that __import_whatever function does a rather...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.