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

urlerror, urllib2: "no address" ... why or debug tips?

Help please with a URLError. Invoking a url that works in Firefox and
IE results in a "urlerror 7, no address ..." in python. I need to debug
why.

Traceback is below. There's a redirect when the url is invoked (it's
part of a chain) - you can see it using liveheaders in firefox. What is
the best way to debug this? I tried setting debug on HTTPConnection but
this doesn't work (from some web posts, setting debug is broken in
2.4). What's the best way to see what's happening, way to monitor the
call sequences etc?

Any help much appreciated. Thx.

handle = urllib2.urlopen(req)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/urllib2.py",
line 130, in urlopen
return _opener.open(url, data)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/urllib2.py",
line 364, in open
response = meth(req, response)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/urllib2.py",
line 471, in http_response
response = self.parent.error(
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/urllib2.py",
line 396, in error
result = self._call_chain(*args)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/urllib2.py",
line 337, in _call_chain
result = func(*args)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/urllib2.py",
line 554, in http_error_302
return self.parent.open(new)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/urllib2.py",
line 358, in open
response = self._open(req, data)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/urllib2.py",
line 376, in _open
'_open', req)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/urllib2.py",
line 337, in _call_chain
result = func(*args)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/urllib2.py",
line 1021, in http_open
return self.do_open(httplib.HTTPConnection, req)
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/urllib2.py",
line 996, in do_open
raise URLError(err)
URLError: <urlopen error (7, 'No address associated with nodename')>

Mar 10 '06 #1
1 2363
jo*****@gmail.com:
Help please with a URLError.


Post your code (a small self-contained example, preferrably) and the URL.

--
René Pijlman
Mar 10 '06 #2

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

Similar topics

1
by: aerobar2 | last post by:
When I debug my application I get "no symbols loaded" ================= 'DefaultDomain': Loaded 'c:\winnt\microsoft.net\framework\v1.1.4322\mscorlib.dll', No symbols loaded. 'MHSFire': Loaded...
3
by: kj | last post by:
This problem is driving me nuts. The code at the end of this post below works fine with IE, but fails with Mozilla. You can see it in action at http://tinyurl.com/2jvo3 With Mozilla 1.4 and...
134
by: James A. Donald | last post by:
I am contemplating getting into Python, which is used by engineers I admire - google and Bram Cohen, but was horrified to read "no variable or argument declarations are necessary." Surely that...
3
by: Lou | last post by:
I get an error on my break points "The breakpoint will not be currently be hit. No symbols loaded" I notices the icons in my solution explorer are blank? This is a .dll I am trying to debug, but...
5
by: asdf | last post by:
Hello, I was enjoying working in VS for half a year without any problems and now I cannot debug anymore. Without any really reason my Studio tells me that the page that I want to debug has - No...
10
by: RDI | last post by:
What's it mean? My prog runs fine. Then as soon as I press ok or cancel, the following is what's in the output area of the debugger. TIA -- RDI (remove the exclamation from the email...
1
by: D.M. | last post by:
Hi, One of the people here at work has designed a database that students will be using to enter data. She has Yes/No selection buttons, which start out grayed out with no value. If a student...
0
by: Alex B. | last post by:
I have an asp.net VS 2005 solution that was converted from VS 2003 that I have a deployment problem with. It compiles and runs fine, but now that I'm ready to deploy it I cannot set the website...
8
by: Steve Kershaw | last post by:
I have a debugging/breakpoint problem that I must fix before I move on!!! When I set a breakpoint in my ASP.NET (C#) page I get the red circle with the 'A'. When I mouse over this breakpoint I...
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: 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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
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,...

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.