win32com.client.Dispatch - understanding error messages

M

mirandacascade

O/S : Win2K
vsn of Python: 2.4

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

Pythonwin session:
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.
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
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:
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
 
D

Duncan Booth

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).
 
M

mirandacascade

Duncan said:
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.
 
D

Duncan Booth

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?
 
M

mirandacascade

Duncan said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top