473,385 Members | 1,587 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,385 software developers and data experts.

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('MSXML2.XMLHTTP')
blah.open("POST", "12.5.81.49/crg_cbsil_vtest_52/crg.aspx", 0)
Traceback (most recent call last):
File "<interactive 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.client.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('MSXML2.XMLHTTP.4.0')
blah.open("POST", "12.5.81.49/crg_cbsil_vtest_52/crg.aspx", 0)
Traceback (most recent call last):
File "<interactive 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('MSXML2.ServerXMLHTTP')
blah.open("POST", "12.5.81.49/crg_cbsil_vtest_52/crg.aspx", 0)
Traceback (most recent call last):
File "<interactive input>", line 1, in ?
File "<COMObject MSXML2.ServerXMLHTTP>", 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...instead of using 0 to represent
False, I tried:
>>False
False
>>blah = win32com.client.Dispatch('MSXML2.XMLHTTP')
blah.open("POST", "12.5.81.49/crg_cbsil_vtest_52/crg.aspx", False)
Traceback (most recent call last):
File "<interactive 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 6793
wrote:
>>>False
False
>>>blah = win32com.client.Dispatch('MSXML2.XMLHTTP')
blah.open("POST", "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
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...
0
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...
1
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...
0
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...
0
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...
3
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...
4
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...
2
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
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...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
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...
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
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
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...

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.