473,657 Members | 2,753 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Some errors when running code in diveintopython: (

Environment:
WinXP SP2 + Python 2.4.2, with SOAPpy-0.11.6.zip, fpconst-0.7.2.zip,
and PyXML-0.8.4.win32-py2.4.exe installed.

Problem:
I'm reading DiveIntoPython these days. When running code of "Example
12.11. Calling A Web Service Through A WSDL Proxy", I got some errors
as follow. Will you please give me some suggestion?

IDLE 1.1.2's Output:
from SOAPpy import WSDL
wsdlFile = 'http://www.xmethods.ne t/sd/2001/TemperatureServ ice.wsdl'
server = WSDL.Proxy(wsdl File)
server.methods. keys() [u'getTemp'] server.getTemp( '90210')
Traceback (most recent call last):
File "<pyshell#4 >", line 1, in -toplevel-
server.getTemp( '90210')
File "E:\Program Files\Python\Li b\site-packages\SOAPpy \Client.py",
line 453, in __call__
return self.__r_call(* args, **kw)
File "E:\Program Files\Python\Li b\site-packages\SOAPpy \Client.py",
line 475, in __r_call
self.__hd, self.__ma)
File "E:\Program Files\Python\Li b\site-packages\SOAPpy \Client.py",
line 347, in __call
config = self.config)
File "E:\Program Files\Python\Li b\site-packages\SOAPpy \Client.py",
line 187, in call
r.endheaders()
File "E:\Program Files\Python\li b\httplib.py", line 795, in
endheaders
self._send_outp ut()
File "E:\Program Files\Python\li b\httplib.py", line 676, in
_send_output
self.send(msg)
File "E:\Program Files\Python\li b\httplib.py", line 643, in send
self.connect()
File "E:\Program Files\Python\li b\httplib.py", line 611, in connect
socket.SOCK_STR EAM):
gaierror: (11001, 'getaddrinfo failed')


Dec 23 '05 #1
7 4031
ic*****@gmail.c om wrote:
I'm reading DiveIntoPython these days. When running code of "Example
12.11. Calling A Web Service Through A WSDL Proxy", I got some errors
as follow. Will you please give me some suggestion? gaierror: (11001, 'getaddrinfo failed')


this usually means that your computer (or your nameserver) have problems
looking up the host name. it's not a python problem.

have you checked your firewall settings (and/or firewall logs) ?

can you reach www.xmethods.net and services.xmetho ds.net from your
browser?

what happens if you do
import socket
socket.getaddri nfo("www.xmetho ds.net", 80)
socket.getaddri nfo("services.x methods.net", 80)


?

</F>

Dec 23 '05 #2
I can visit those two websites above, but when I run your code, I get
those errors(BTW,I have closed my firewall
):
import socket
socket.getaddri nfo("www.xmetho ds.net", 80)
Traceback (most recent call last):
File "<pyshell#1 >", line 1, in -toplevel-
socket.getaddri nfo("www.xmetho ds.net", 80)
gaierror: (11001, 'getaddrinfo failed') socket.getaddri nfo("services.x methods.net", 80)
Traceback (most recent call last):
File "<pyshell#2 >", line 1, in -toplevel-
socket.getaddri nfo("services.x methods.net", 80)
gaierror: (11001, 'getaddrinfo failed')


what can I do?

Dec 23 '05 #3

must be something with your settings ...

I remeber once I had truly puzzling problem that manifested itself the
same way ... Firefox and cygwin python would work fine but the windows
python would raise errors when trying to connect via http ...

.... finally I realized that the day before IE was set to use a proxy
server ( to capture traffic for testing but the proxy was not on that
moment) ... I know little on how Windows works but it was quite a
surprise that setting IE to work some way had some unwanted
reprecussions somewhere else ...

Dec 23 '05 #4
Istvan Albert wrote:
I remeber once I had truly puzzling problem that manifested itself the
same way ... Firefox and cygwin python would work fine but the windows
python would raise errors when trying to connect via http ...

... finally I realized that the day before IE was set to use a proxy
server ( to capture traffic for testing but the proxy was not on that
moment) ... I know little on how Windows works but it was quite a
surprise that setting IE to work some way had some unwanted
reprecussions somewhere else ...


See the documentation for urllib.urlopen:

"""
In a Windows environment, if no proxy environment variables are set,
proxy settings are obtained from the registry's Internet Settings
section.
"""

-- David

Dec 23 '05 #5
El Fri, 23 Dec 2005 05:18:30 -0800, iclinux escribió:
I can visit those two websites above, but when I run your code, I get
those errors(BTW,I have closed my firewall
):
import socket
socket.getaddri nfo("www.xmetho ds.net", 80)
Traceback (most recent call last):
File "<pyshell#1 >", line 1, in -toplevel-
socket.getaddri nfo("www.xmetho ds.net", 80)
gaierror: (11001, 'getaddrinfo failed') socket.getaddri nfo("services.x methods.net", 80)
Traceback (most recent call last):
File "<pyshell#2 >", line 1, in -toplevel-
socket.getaddri nfo("services.x methods.net", 80)
gaierror: (11001, 'getaddrinfo failed')


what can I do?

Have you got a Firewall ?
Take a look over firewall settings and give Python rights for accesing
port 80
Dec 23 '05 #6
beryan wrote:
El Fri, 23 Dec 2005 05:18:30 -0800, iclinux escribió:
gaierror: (11001, 'getaddrinfo failed')

Take a look over firewall settings and give Python rights for accesing
port 80


Well, rather he should take a look at allowing Python to resolve host names.
That's what this error is about.

--- Heiko.
Dec 23 '05 #7
thanks all ! I've solved this problem:

Let me show my net environment first. My pc is in a local network, and
through a proxy server can I reach the Internet, so I changed my
Internet Settings.

It seems that everything goes well, I can surf Internet, etc, but what
a pity, I can't resolve a host's address by its name by gethostbyname()
in C Language; in python, socket.getaddri nfo() will fail.

So today, I installed MSFireWallClien t which will connect to the ISA
server. and after that, everything works: )

Thanks again, Merry Christmas and a Happy New Year!!

Dec 24 '05 #8

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

Similar topics

11
2257
by: mikey_boy | last post by:
Hello! Curious if anyone could give me a hand. I wrote this PHP script with makes a simple connection to a mysql database called firstdb and just pulls back the results and displays on the webpage. Here is the script. I appreciate any light that could be shed on the script and why I would get the errors. Thank you,
1
4389
by: Mike S. Nowostawsky | last post by:
I am getting this error when I try to run a program in my cgi-bin directory (don't know what I'm still missing to make it work): *** Authentication required! This server could not verify that you are authorized to access the URL "/~group3/cgi-bin/ack.cgi". You either supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.
0
2499
by: Bill Gates | last post by:
i have two servers this is happenning on. each has a maintenance plan with the same options selected... General Tab - applies to all databases Optimizations Tab - reorganize data and index pages - change free space per page to: 10% - remove unused space from database files
2
1354
by: BryanEverly | last post by:
Hi, I'm struggling with a problem and was hoping that someone on this group could point me in the right direction. I'm not looking for a free ride, just a suggestion as to how best to use all the tools at my disposal to diagnose the situation. I have an existing COM+ / ASP application (the COM+ objects are written in VB 6.0) that I am wanting to migrate forward to .NET (using VB.Net). I have added some ASPX pages to the existing...
12
2514
by: Russ | last post by:
Hello. My new dev machine is running XP Pro. In the past all equipment has only used Windows 2000. I have had a lot of problems getting my projects up and running on the new machine. The current one is a permission error. The project is a VC++ Web Service. It works fine when the service is hosted on the old W2K dev machine, but on the new XP machine I get a permission error when the service tries to open a text file on the Windows...
193
9520
by: Michael B. | last post by:
I was just thinking about this, specifically wondering if there's any features that the C specification currently lacks, and which may be included in some future standardization. Of course, I speak only of features in the spirit of C; something like object-orientation, though a nice feature, does not belong in C. Something like being able to #define a #define would be very handy, though, e.g: #define DECLARE_FOO(bar) #define...
2
2408
by: Stephen Miller | last post by:
Can the CustomValidator be used to simply report unexpected errors, without requiring Client/Server validation? To explain, say you had a simple text box and button that did a Full-text Search of a Catalogue in SQL. Malformed search requests can generate a variety of errors, which I simply want to catch, set the CustomValidator's IsValid method to false and assign the ErrorMessage to the CustomValidator's Message property. For example: ...
1
1511
by: Gustavo Barbosa | last post by:
I´m having this problem: I'm stress testing a ASP.NET web application using ACT and comparing results with a previous version of the website (developed in ColdFusion 4.5). When using 300 simultaneous users (about 25-30 rps), everything works fine, although Cold Fusion seems to be a little faster than ASP.NET. When using 2000 simultaneous users (about 50-60 rps), Cold Fusion works really fine but the application in ASP.NET starts to have...
0
306
by: iclinux | last post by:
Environment: WinXP SP2 + Python 2.4.2, with SOAPpy-0.11.6.zip, fpconst-0.7.2.zip, and PyXML-0.8.4.win32-py2.4.exe installed. Problem: I'm reading DiveIntoPython these days. When running code of "Example 12.11. Calling A Web Service Through A WSDL Proxy", I got some errors as follow. Will you please give me some suggestion? IDLE 1.1.2's Output:
0
8382
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8297
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8816
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...
0
8717
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6162
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2726
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
1930
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1600
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.