473,397 Members | 2,084 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,397 software developers and data experts.

urllib2 gets 404 error cannot display after a while

i use urllib2 to open the websites and get info. it works for a while, then will be stopped, the error in idle is http error 404 no such domain. but i just changed the parameters in the url by looping, and i can open it in ie or firefox. any one have any idea to deal with it? if I running 2 more similar programs in command line at same time, them will be stopped more sooner.

my code is running in python 2.5 + tor.

Thks a lot.


"Traceback (most recent call last):
File "C:\Documents and Settings\XXXX\Desktop\NZ_New - Copy\NZ 1- 40 14022009\nz_new1.py", line 191, in <module>
Main()
File "C:\Documents and Settings\XXXX\Desktop\NZ_New - Copy\NZ 1- 40 14022009\nz_new1.py", line 69, in Main
Process(1)
File "C:\Documents and Settings\XXXX\Desktop\NZ_New - Copy\NZ 1- 40 14022009\nz_new1.py", line 141, in Process
input_page = urllib2.urlopen(req)
File "C:\Python25\lib\urllib2.py", line 121, in urlopen
return _opener.open(url, data)
File "C:\Python25\lib\urllib2.py", line 380, in open
response = meth(req, response)
File "C:\Python25\lib\urllib2.py", line 491, in http_response
'http', request, response, code, msg, hdrs)
File "C:\Python25\lib\urllib2.py", line 418, in error
return self._call_chain(*args)
File "C:\Python25\lib\urllib2.py", line 353, in _call_chain
result = func(*args)
File "C:\Python25\lib\urllib2.py", line 499, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 404: No such domain"
Feb 26 '09 #1
1 2279
hey,
could you put the code of the loop you are talking about... and also give some code around the lines 191, 69 and 141

I'll try to help :)

regards,
sharat87
Feb 27 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: jel | last post by:
I ran what was submitted in several forums, but it's not exactly what i'm looking for. I'm dy'n over here. Ah, the frustrations of an amateur programmer. I included the code below in c++. which...
8
by: Kragen Sitaker | last post by:
ERROR: Cannot insert a duplicate key into unique index pg_class_relname_nsp_index We've been getting this error in our application every once in a while --- typically once an hour to once a day,...
1
by: Vycka | last post by:
Hello, There is a enterprise web application that is based on asp.net technologies and works on Microsoft IIS. The total number of users is 850. When the load of system gets very high, the...
5
by: Dominiek | last post by:
Hi, I have a strange problem. during the developement of my program, while progressively writing more and more code, the callstack of my program gets deeper and deeper (7 levels). Then, all...
1
by: Jason Chan | last post by:
Some chinese characters data (in Big5 encoding) is stored in database. I tried to display the data in an aspx but the characters cannot display correctly. I tried anything I think is related: -...
10
by: Lorie0114 | last post by:
Hello, We have an issue that I do not know how to resolve. Our website has several hundred reports. There are a handful of them that are causing issues when there is no interaction for a couple...
5
by: mukeshrasm | last post by:
Hi I am working on gd library with PHP to create graphs which is displaying correctly. But I want to display some information about this graph as text which will not be part of this graph means...
4
by: eschneider | last post by:
I get the following error when trying to browse the .asmx. I get the same thing when trying to add a reference. using .NET 2.0 There is no error message. Any ideas? Thanks,
2
by: jay123 | last post by:
Hello, I am making a project in VS2008, C#. Background of prob: I have integrated a postcode(UK- its like if someone enters postcode and clicks button to retrieve the address, he gets all the...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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,...
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...
0
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...
0
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...
0
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,...
0
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...

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.