--> -->
<class 'urllib2.HTTPError'> | Python 2.7.6: /usr/bin/python Sat Dec 14 20:08:50 2019 |
A problem occurred in a Python script. Here is the sequence of
function calls leading up to the error, in the order they occurred.
/home/ripp/wwwLinux/msv3d/cgi-bin/mutant in () |
878 html.header()
|
879
|
=> 880 mutant_data = get_mutant(rsid, proteinid, mutation, newmutant)
|
881 left_html = left(proteinid, mutant_data)
|
882 proteinid = get_value(mutant_data, "proteinid")
|
mutant_data undefined, get_mutant = <function get_mutant>, rsid = '', proteinid = 'P21817\xce\xbcTATION=P.ASP668GLU', mutation = '', newmutant = 'no' |
/home/ripp/wwwLinux/msv3d/cgi-bin/mutant in get_mutant(rsid='', proteinid='P21817\xce\xbcTATION=P.ASP668GLU', mutation='', newmutant='no') |
84 url = cs.URL_SM2PH_MUTANT + "?rsid=%s&outfmt=txt" % (rsid)
|
85 #print url
|
=> 86 mutant_data = urllib2.urlopen(urllib2.quote(url, safe="%/:=&?~#+!$,;'@()*[]"), None, 600).readlines()
|
87 #print mutant_data[0][:5]
|
88 if (mutant_data[0][:5]=="ERROR"):
|
mutant_data undefined, global urllib2 = <module 'urllib2' from '/usr/lib/python2.7/urllib2.pyc'>, urllib2.urlopen = <function urlopen>, urllib2.quote = <function quote>, url = 'http://lbgi.fr/sm2ph/cgi-bin/mutant?protein=P21817\xce\xbcTATION=P.ASP668GLU&mutation=&outfmt=txt', safe undefined, builtin None = None, ).readlines undefined |
/usr/lib/python2.7/urllib2.py in urlopen(url='http://lbgi.fr/sm2ph/cgi-bin/mutant?protein=P21817%CE%BCTATION=P.ASP668GLU&mutation=&outfmt=txt', data=None, timeout=600) |
125 if _opener is None:
|
126 _opener = build_opener()
|
=> 127 return _opener.open(url, data, timeout)
|
128
|
129 def install_opener(opener):
|
global _opener = <urllib2.OpenerDirector instance>, _opener.open = <bound method OpenerDirector.open of <urllib2.OpenerDirector instance>>, url = 'http://lbgi.fr/sm2ph/cgi-bin/mutant?protein=P21817%CE%BCTATION=P.ASP668GLU&mutation=&outfmt=txt', data = None, timeout = 600 |
/usr/lib/python2.7/urllib2.py in open(self=<urllib2.OpenerDirector instance>, fullurl='http://lbgi.fr/sm2ph/cgi-bin/mutant?protein=P21817%CE%BCTATION=P.ASP668GLU&mutation=&outfmt=txt', data=None, timeout=600) |
408 for processor in self.process_response.get(protocol, []):
|
409 meth = getattr(processor, meth_name)
|
=> 410 response = meth(req, response)
|
411
|
412 return response
|
response = <addinfourl at 140525155558320 whose fp = <socket._fileobject object>>, meth = <bound method HTTPErrorProcessor.http_response of <urllib2.HTTPErrorProcessor instance>>, req = <urllib2.Request instance> |
/usr/lib/python2.7/urllib2.py in http_response(self=<urllib2.HTTPErrorProcessor instance>, request=<urllib2.Request instance>, response=<addinfourl at 140525155558320 whose fp = <socket._fileobject object>>) |
521 if not (200 <= code < 300):
|
522 response = self.parent.error(
|
=> 523 'http', request, response, code, msg, hdrs)
|
524
|
525 return response
|
request = <urllib2.Request instance>, response = <addinfourl at 140525155558320 whose fp = <socket._fileobject object>>, code = 403, msg = 'Forbidden', hdrs = <httplib.HTTPMessage instance> |
/usr/lib/python2.7/urllib2.py in error(self=<urllib2.OpenerDirector instance>, proto=403, *args=({301: [<urllib2.HTTPRedirectHandler instance>], 302: [<urllib2.HTTPRedirectHandler instance>], 303: [<urllib2.HTTPRedirectHandler instance>], 307: [<urllib2.HTTPRedirectHandler instance>], 'default': [<urllib2.HTTPDefaultErrorHandler instance>]}, 'default', 'http_error_default', <urllib2.Request instance>, <addinfourl at 140525155558320 whose fp = <socket._fileobject object>>, 403, 'Forbidden', <httplib.HTTPMessage instance>)) |
446 if http_err:
|
447 args = (dict, 'default', 'http_error_default') + orig_args
|
=> 448 return self._call_chain(*args)
|
449
|
450 # XXX probably also want an abstract factory that knows when it makes
|
self = <urllib2.OpenerDirector instance>, self._call_chain = <bound method OpenerDirector._call_chain of <urllib2.OpenerDirector instance>>, args = ({301: [<urllib2.HTTPRedirectHandler instance>], 302: [<urllib2.HTTPRedirectHandler instance>], 303: [<urllib2.HTTPRedirectHandler instance>], 307: [<urllib2.HTTPRedirectHandler instance>], 'default': [<urllib2.HTTPDefaultErrorHandler instance>]}, 'default', 'http_error_default', <urllib2.Request instance>, <addinfourl at 140525155558320 whose fp = <socket._fileobject object>>, 403, 'Forbidden', <httplib.HTTPMessage instance>) |
/usr/lib/python2.7/urllib2.py in _call_chain(self=<urllib2.OpenerDirector instance>, chain={301: [<urllib2.HTTPRedirectHandler instance>], 302: [<urllib2.HTTPRedirectHandler instance>], 303: [<urllib2.HTTPRedirectHandler instance>], 307: [<urllib2.HTTPRedirectHandler instance>], 'default': [<urllib2.HTTPDefaultErrorHandler instance>]}, kind='default', meth_name='http_error_default', *args=(<urllib2.Request instance>, <addinfourl at 140525155558320 whose fp = <socket._fileobject object>>, 403, 'Forbidden', <httplib.HTTPMessage instance>)) |
380 func = getattr(handler, meth_name)
|
381
|
=> 382 result = func(*args)
|
383 if result is not None:
|
384 return result
|
result undefined, func = <bound method HTTPDefaultErrorHandler.http_error...lt of <urllib2.HTTPDefaultErrorHandler instance>>, args = (<urllib2.Request instance>, <addinfourl at 140525155558320 whose fp = <socket._fileobject object>>, 403, 'Forbidden', <httplib.HTTPMessage instance>) |
/usr/lib/python2.7/urllib2.py in http_error_default(self=<urllib2.HTTPDefaultErrorHandler instance>, req=<urllib2.Request instance>, fp=<addinfourl at 140525155558320 whose fp = <socket._fileobject object>>, code=403, msg='Forbidden', hdrs=<httplib.HTTPMessage instance>) |
529 class HTTPDefaultErrorHandler(BaseHandler):
|
530 def http_error_default(self, req, fp, code, msg, hdrs):
|
=> 531 raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
|
532
|
533 class HTTPRedirectHandler(BaseHandler):
|
global HTTPError = <class 'urllib2.HTTPError'>, req = <urllib2.Request instance>, req.get_full_url = <bound method Request.get_full_url of <urllib2.Request instance>>, code = 403, msg = 'Forbidden', hdrs = <httplib.HTTPMessage instance>, fp = <addinfourl at 140525155558320 whose fp = <socket._fileobject object>> |
<class 'urllib2.HTTPError'>: HTTP Error 403: Forbidden
args =
()
close =
<bound method HTTPError.close of HTTPError()>
code =
403
errno =
None
filename =
'http://lbgi.fr/sm2ph/cgi-bin/mutant?protein=P21817%CE%BCTATION=P.ASP668GLU&mutation=&outfmt=txt'
fileno =
<bound method _fileobject.fileno of <socket._fileobject object>>
fp =
<addinfourl at 140525155558320 whose fp = <socket._fileobject object>>
getcode =
<bound method HTTPError.getcode of HTTPError()>
geturl =
<bound method HTTPError.geturl of HTTPError()>
hdrs =
<httplib.HTTPMessage instance>
headers =
<httplib.HTTPMessage instance>
info =
<bound method HTTPError.info of HTTPError()>
message =
''
msg =
'Forbidden'
next =
<bound method _fileobject.next of <socket._fileobject object>>
read =
<bound method _fileobject.read of <socket._fileobject object>>
readline =
<bound method _fileobject.readline of <socket._fileobject object>>
readlines =
<bound method _fileobject.readlines of <socket._fileobject object>>
reason =
'Forbidden'
strerror =
None
url =
'http://lbgi.fr/sm2ph/cgi-bin/mutant?protein=P21817%CE%BCTATION=P.ASP668GLU&mutation=&outfmt=txt'