On Friday, December 6, 2013 4:46:26 PM UTC-8, sonu kumar wrote:
>
> I tried but same error is coming....
>
>
If you enter the URL directly in the address box of your browser, can you 
get to the expected page?

I you try from a browser on the machine your web2py server is running on, 
can you get to the expected page?

/dps

 

> in my traceback I have seen line 397, from here problem is showing...
>
> *File /usr/lib64/python2.6/urllib2.py in open at line 397* code arguments 
> variables
> Function argument list
>
> (self=<urllib2.OpenerDirector instance>, 
> fullurl='http://ww<http://www.uniprot.org/mapping/>
> 'w.uniprot.org/mapping/ <http://www.uniprot.org/mapping/>, 
> data='to=MEROPS_ID&query=P22894&from=ID&format=tab', timeout=300)
> Code listing
>
> 392.
> 393.
> 394.
> 395.
> 396.
> 397.
>
> 398.
> 399.
> 400.
> 401.
>
>
>         # post-process response
>         meth_name = protocol+"_response"
>         for processor in self.process_response.get(protocol, []):
>             meth = getattr(processor, meth_name)
>             response = meth(req, response)
>
>
>         return response
>
>     def _open(self, req, data=None):
>
> Variablesmeth<bound method HTTPErrorProcessor.http_response of 
> <urllib2.HTTPErrorProcessor instance>>req<urllib2.Request instance>
> response<addinfourl at 140652537300824 whose fp = None>
>
>
>
> On Friday, 6 December 2013 16:40:13 UTC-8, Michele Comitini wrote:
>>
>> the error is
>> URLError: <urlopen error timed out>
>>
>> increase  the timeout here to 300:
>>
>> responsemerops = opener.open('http://www.uniprot.org/mapping/', data, 
>> timeout=30)
>>
>> and see what happens
>>
>>
>> 2013/12/7 sonu kumar <sonu.bioi...@gmail.com>
>>
>>> here is my Traceback...
>>>
>>> Traceback (most recent call last):
>>>   File "/opt/web-apps/web2py/gluon/restricted.py", line 217, in restricted
>>>
>>>     exec ccode in environment
>>>   File 
>>> "/opt/web-apps/web2py/applications/CleavPredict/controllers/default.py", 
>>> line 1541, in <module>
>>>
>>>   File "/opt/web-apps/web2py/gluon/globals.py", line 372, in <lambda>
>>>
>>>     self._caller = lambda f: f()
>>>
>>>   File 
>>> "/opt/web-apps/web2py/applications/CleavPredict/controllers/default.py", 
>>> line 557, in result
>>>
>>>     return uniprot_merops()
>>>   File 
>>> "/opt/web-apps/web2py/applications/CleavPredict/controllers/default.py", 
>>> line 315, in uniprot_merops
>>>
>>>     responsemerops = opener.open('http://www.uniprot.org/mapping/', data, 
>>> timeout=30)
>>>
>>>   File "/usr/lib64/python2.6/urllib2.py", line 397, in open
>>>
>>>     response = meth(req, response)
>>>
>>>   File "/usr/lib64/python2.6/urllib2.py", line 510, in http_response
>>>
>>>     'http', request, response, code, msg, hdrs)
>>>
>>>   File "/usr/lib64/python2.6/urllib2.py", line 429, in error
>>>
>>>     result = self._call_chain(*args)
>>>
>>>   File "/usr/lib64/python2.6/urllib2.py", line 369, in _call_chain
>>>
>>>     result = func(*args)
>>>   File "/usr/lib64/python2.6/urllib2.py", line 616, in http_error_302
>>>
>>>     return self.parent.open(new, timeout=req.timeout)
>>>
>>>   File "/usr/lib64/python2.6/urllib2.py", line 391, in open
>>>
>>>     response = self._open(req, data)
>>>
>>>   File "/usr/lib64/python2.6/urllib2.py", line 409, in _open
>>>
>>>     '_open', req)
>>>   File "/usr/lib64/python2.6/urllib2.py", line 369, in _call_chain
>>>
>>>     result = func(*args)
>>>   File "/usr/lib64/python2.6/urllib2.py", line 1190, in http_open
>>>
>>>     return self.do_open(httplib.HTTPConnection, req)
>>>
>>>   File "/usr/lib64/python2.6/urllib2.py", line 1165, in do_open
>>>
>>>     raise URLError(err)
>>> URLError: <urlopen error timed out>
>>>
>>>
>>> On Thursday, 5 December 2013 16:34:29 UTC-8, sonu kumar wrote:
>>>
>>>> Hi All,
>>>>
>>>> In my application I am trying to call external weblink to map data but 
>>>> it always gives me <class 'urllib2.URLError'> <urlopen error timed 
>>>> out> error.
>>>>
>>>> I am using several times urllib for calling same weblinks for different 
>>>> mapping....Will this cause problem??? 
>>>>
>>>> params = {'from':'ID', 'to':'MEROPS_ID', 'format':'tab', 
>>>> 'query':'P22894'}
>>>>      data = urllib.urlencode(params)
>>>>      request1 = urllib2.Request('http://www.uniprot.org/mapping/', 
>>>> data)
>>>>      response = urllib2.urlopen(request1, timeout=30)
>>>>
>>>> params3 = {'from':'ID', 'to':'P_ENTREZGENEID', 'format':'tab', 
>>>> 'query':'P22894'}
>>>>      coexdata = urllib.urlencode(params3)
>>>>      coexrequest = urllib2.Request('http://www.uniprot.org/mapping/', 
>>>> coexdata)
>>>>      coexresponse = urllib2.urlopen(coexrequest, timeout=30)
>>>>
>>>> params4 = {'from':'ID', 'to':'P_ENTREZGENEID', 'format':'tab', 'query':
>>>> 'P22894'}
>>>>      data6 = urllib.urlencode(params4)
>>>>      requestmmpn = urllib2.Request('http://www.uniprot.org/mapping/', 
>>>> data6)
>>>>      responsemmpn = urllib2.urlopen(requestmmpn, timeout=30)
>>>>
>>>>
>>>> I have seen one http_error_302 
>>>>  
>>>> 611.
>>>> 612.
>>>> 613.
>>>> 614.
>>>> 615.
>>>> 616.
>>>>
>>>> 617.
>>>> 618.
>>>> 619.
>>>> 620.
>>>>
>>>>         # Don't close the fp until we are sure that we won't use it
>>>>         # with HTTPError.
>>>>         fp.read()
>>>>
>>>>         fp.close()
>>>>
>>>>         return self.parent.open(new, timeout=req.timeout)
>>>>
>>>>
>>>>     http_error_301 = http_error_303 = http_error_307 = http_error_302
>>>>
>>>>     inf_msg = "The HTTP server returned a redirect error that would " \
>>>>
>>>>
>>>> any suggestion to solve this issue
>>>>
>>>> Thanks
>>>>
>>>>
>>>>  -- 
>>> Resources:
>>> - http://web2py.com
>>> - http://web2py.com/book (Documentation)
>>> - http://github.com/web2py/web2py (Source code)
>>> - https://code.google.com/p/web2py/issues/list (Report Issues)
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "web2py-users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to web2py+un...@googlegroups.com.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>
>>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to