473,692 Members | 2,105 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

win32com.client .Dispatch - understanding error messages

O/S : Win2K
vsn of Python: 2.4

Hoping to find information that provide information about error
messages being encountered.

Pythonwin session:
>>import win32com.client
blah = win32com.client .Dispatch('MSXM L2.XMLHTTP')
blah.open("PO ST", "12.5.81.49/crg_cbsil_vtest _52/crg.aspx", 0)
Traceback (most recent call last):
File "<interacti ve input>", line 1, in ?
File "<COMObject MSXML2.XMLHTTP> ", line 4, in open
com_error: (-2147352567, 'Exception occurred.', (0, None, None, None,
0, -2147467259), None)

I tried various combinations in Google involving
"win32com.clien t.Dispatch", "MSXML2", "XMLHTTP" and the 2 different
error codes: -2147352567 and -2147467259. So far, I haven't been able
to locate anything that has helped me zero in on the error.

The fact that no error was issued after the blah = ... statement plus
the fact that as soon as I typed the '(' character after blah.open,
that the arguments for the open method were displayed; those two things
make me think that the COM object is installed/registered on the
workstation. Is that a reasonable conclusion?

I observed that there are a few other similarly named objects/methods,
so I tried them as well. The error messages reference some different
dll's, but those error message seemed as inscrutable as the first set
of error messages above.
>>blah = win32com.client .Dispatch('MSXM L2.XMLHTTP.4.0' )
blah.open("PO ST", "12.5.81.49/crg_cbsil_vtest _52/crg.aspx", 0)
Traceback (most recent call last):
File "<interacti ve input>", line 1, in ?
File "<COMObject MSXML2.XMLHTTP. 4.0>", line 4, in open
com_error: (-2147352567, 'Exception occurred.', (0, 'msxml4.dll',
'System error: -2147012890.\r\n ', None, 0, -2147012890), None)

and
>>blah = win32com.client .Dispatch('MSXM L2.ServerXMLHTT P')
blah.open("PO ST", "12.5.81.49/crg_cbsil_vtest _52/crg.aspx", 0)
Traceback (most recent call last):
File "<interacti ve input>", line 1, in ?
File "<COMObject MSXML2.ServerXM LHTTP>", line 4, in open
com_error: (-2147352567, 'Exception occurred.', (0, 'msxml3.dll',
'Unspecified error\r\n', None, 0, -2147467259), None)

Also tried varying the 3rd argument...inst ead of using 0 to represent
False, I tried:
>>False
False
>>blah = win32com.client .Dispatch('MSXM L2.XMLHTTP')
blah.open("PO ST", "12.5.81.49/crg_cbsil_vtest _52/crg.aspx", False)
Traceback (most recent call last):
File "<interacti ve input>", line 1, in ?
File "<COMObject MSXML2.XMLHTTP> ", line 4, in open
com_error: (-2147352567, 'Exception occurred.', (0, None, None, None,
0, -2147467259), None)

So, if possible, it would be nice to know two different types of
things:
1) what steps to take to correct these errors
2) where one can locate information about these types of errors

Jul 18 '06 #1
4 6886
wrote:
>>>False
False
>>>blah = win32com.client .Dispatch('MSXM L2.XMLHTTP')
blah.open("P OST", "12.5.81.49/crg_cbsil_vtest _52/crg.aspx", False)
Does using an absolute URL for the url parameter help any? You've specified
a relative URL (i.e. the folder 12.5.81.49 under the current location).

Jul 18 '06 #2
Duncan Booth wrote:
wrote:

Does using an absolute URL for the url parameter help any? You've specified
a relative URL (i.e. the folder 12.5.81.49 under the current location).
I don't know the answer to that question. I know that when I'm on the
same workstation and I copy/paste the string that is the url parameter
into my browser and press Enter, that a reply appears within the
browser, and that reply has content that suggests that the browser app
was able to 'talk' to an application on the other end. The error
message being received in reply to the open method make me think that
the open method wasn't able to talk to any app on the other end. I'm
not sure what can be inferred from that observation other than the url
parameter appears to be valid when it is used in a browser application.

Jul 18 '06 #3
mi************@ yahoo.com wrote:
Duncan Booth wrote:
>wrote:

Does using an absolute URL for the url parameter help any? You've
specified a relative URL (i.e. the folder 12.5.81.49 under the
current location).

I don't know the answer to that question. I know that when I'm on the
same workstation and I copy/paste the string that is the url parameter
into my browser and press Enter, that a reply appears within the
browser, and that reply has content that suggests that the browser app
was able to 'talk' to an application on the other end. The error
message being received in reply to the open method make me think that
the open method wasn't able to talk to any app on the other end. I'm
not sure what can be inferred from that observation other than the url
parameter appears to be valid when it is used in a browser
application.
Are you really sure that the browser isn't making guesses about what you
meant and correcting the error for you? Does what remains in the address
bar when the page is retrieved really match *exactly* what you copied and
pasted?
Jul 18 '06 #4

Duncan Booth wrote:
Are you really sure that the browser isn't making guesses about what you
meant and correcting the error for you? Does what remains in the address
bar when the page is retrieved really match *exactly* what you copied and
pasted?
Thank you for that pointer. The answer is: no, it does not match
exactly. The browser did indeed, as you surmised, make a guess and
correct the error. The browser added 'http://' to the beginning. When
'http://' gets added to the beginning of the url parameter, all is well.

Jul 19 '06 #5

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

Similar topics

3
7009
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 and Word examples run fine. win32com.client.Dispatch("Excel.Application") etc., but how does one know the ("<foo>.<bar>") to type in? Excel looks only vaguely like "Excel.Application" in the com browser.
0
1899
by: Paul McGuire | last post by:
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):
1
3258
by: Patrick | last post by:
I am investigating a web-based app wherein I wanted to provide html form frontends to an Excel spreadsheet sitting on a MS Windows server; with each authenticated HTTP user having thier own "invisible" copy of the spreadsheet changeable via form POST via COM automation object (via Python) - then after recalculating - present the spreadsheet results in HTML. The whole idea to 1: isolate the user from having to have Excel, and 2: avoiding...
0
4096
by: goermezer | last post by:
Hello, I have some problems to automate a CAD (computer aided design) Software called CATIA V5 from Dassault Systemes. CATIA V5 has a builtin VB-Editor like Word, Excel, … and registers itself as a COM-server. With VB one can automate everything in CATIA V5 with a lot of registered Object Libraries. A VB example:
0
2294
by: mb3242 | last post by:
Hello, I'm trying to use win32com to call a method in a COM object. I'm having a problem with Python choosing the wrong type when wrapping up lists into VARIANTs. The function I'm trying to call in C++ looks like this: HRESULT write( VARIANT * len, VARIANT * saData, VARIANT * result); Where saData contains a SafeArray of bytes and len is its length. The function returns any error information in result.
3
6941
by: tyler.schlosser | last post by:
Hi there, I am trying to launch a program called AmiBroker using the command: AB = win32com.client.Dispatch("Broker.Application") However, I have a dual-core CPU and would like to launch two instances of AmiBroker. I know it is possible to run two instances simultaneously since it is easy to do manually by double-clicking the AmiBroker.exe file twice. However, when I write two lines of code like this:
4
17049
by: vithi | last post by:
Hi' I am trying to launch an application. When I try like that When I try like that Excel is opening import win32com.client object = win32com.client.Dispatch("Excel.Application") object.Visible = 1 But when I try my application which is QeepIt.exe which is in the c:\ drive it is not running Any body tell me how to give path to open an exectable application in
2
9260
by: Ray | last post by:
Hi, I need to use cell's background color. when I record a macro from excel, it shows: Rows("7:7").Select With Selection.Interior .ColorIndex = 8 .Pattern = xlSolid
1
3027
by: SPJ | last post by:
Sorry, forgot to mention Subject in my earlier post, hence reposting. ------------ I am writing a script which need's to convert an excel file to csv (text) format. For that I am using the following code: excel = win32com.client.Dispatch("Excel.Application","Quit") workbook = excel.Workbooks.Open(xlsfile) workbook.SaveAs(csvfile, FileFormat=24) # 24 represents xlCSVMSDOS workbook.Close(False) excel.Quit()
0
9079
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8794
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8796
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7626
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5817
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4555
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2968
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2234
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1955
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.