Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Trying to solve a python/mechanize "error 500" http error

Thread Tools

Trying to solve a python/mechanize "error 500" http error

Posts: n/a
i'm getting the following error:
mechanize._response.httperror_seek_wrapper: HTTP Error 500:

i'm running python 5.1
and mechanize 0.1.7b

I have no idea as to what I have to change/modify/include to handle this
issue. The link that I'm testing is at the bottom of the page. When I insert
the link into the browser, I actually get an err page.. so, I suspect that
there is a handler that I should be able to modify/use to handle this

Thoughts/Comments will be greatly appreciated...


the output is:

www =
Traceback (most recent call last):
File "./", line 288, in <module>
q1 = shopfuncs.quant(rhref)
File "/adkiller/", line 56, in quant
File "build/bdist.linux-x86_64/egg/mechanize/", line 203, in
File "build/bdist.linux-x86_64/egg/mechanize/", line 254, in
mechanize._response.httperror_seek_wrapper: HTTP Error 500:
[root@toshiba adkiller]# ./

my code segment looks like:
from mechanize import Browser
import mechanize
br = Browser()
user_agent = 'Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)'
values1 = {'name' : 'Michael Foord',
'location' : 'Northampton',
'language' : 'Python' }
headers = { 'User-Agent' : user_agent }

br.addheaders = [('User-Agent', 'Firefox')]

url2 =""
#gets the page (url) from the quantcast app
print "url2=",url2


this works ok for most of the sites.. but something weird is happening with
the actual page:


Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
HTTP SOAP/HTTP GET/HTTP POST milan_9211 Software 0 01-10-2011 02:10 PM
problem I am trying to solve Gorge Lucas ASP .Net 4 05-04-2009 12:30 PM
Trying to solve a python/mechanize "error 500" http error bruce Python 0 07-21-2008 08:19 PM
How can I solve in HTTP error code in 111 Soe Yan Min Java 2 10-22-2007 04:57 PM
Why problem is Spring Framework trying to solve? James Yong Java 2 10-03-2005 05:31 PM