Bug 712585 - python package urllib2 fails to fetch page, instead it times out.
Summary: python package urllib2 fails to fetch page, instead it times out.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: python
Version: rawhide
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Dave Malcolm
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-11 11:34 UTC by Sreenidhi Nair
Modified: 2011-06-13 21:35 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-06-13 19:55:30 UTC
Type: ---


Attachments (Terms of Use)
output after the script times out (739 bytes, application/octet-stream)
2011-06-11 11:34 UTC, Sreenidhi Nair
no flags Details
a testcase which generates error (255 bytes, text/x-python)
2011-06-11 11:35 UTC, Sreenidhi Nair
no flags Details

Description Sreenidhi Nair 2011-06-11 11:34:14 UTC
Created attachment 504243 [details]
output after the script times out

Description of problem:

When a webpage is fetched by urllib2 , it hangs for a long time. On stopping the script it shows

Version-Release number of selected component (if applicable):

Python version 2.7.1
2.6.38.7-30.fc15.i686.debug

How reproducible:
A simple script using urllib2 will show the error

Steps to Reproduce:
1. Run the script <attached>
2. 
3.
  
Actual results:
The page is fetched

Expected results:
The page should be fetched

Additional info:
The package works well in f13 [dont know if this is useful]

Comment 1 Sreenidhi Nair 2011-06-11 11:35:24 UTC
Created attachment 504244 [details]
a testcase which generates error

Comment 2 Sreenidhi Nair 2011-06-11 11:40:17 UTC
(In reply to comment #0)
> 
> Actual results:
> The page is fetched

Sorry, it should have been ' The page is not fetched '

Comment 3 Dave Malcolm 2011-06-13 19:55:30 UTC
The test case works for me (with python-2.7.1-5.fc15.x86_64), and fetches the page.

F13 had Python 2.6; F14 onwards has 2.7, so perhaps you might be seeing a difference there.

However, I would expect that network delays could cause timeouts to happen with either version; it may just have been luck that led it to work before.

Note that the opener.open() method takes an optional "timeout" argument, which defaults to socket._GLOBAL_DEFAULT_TIMEOUT   You may need to tweak this, or to catch timeouts and retry, perhaps.

Hope this is helpful; closing this out as "NOTABUG".

Comment 4 Sreenidhi Nair 2011-06-13 21:35:01 UTC
(In reply to comment #3)

> However, I would expect that network delays could cause timeouts to happen with
> either version; it may just have been luck that led it to work before.

I'm pretty sure its not network delays - the script attached works very well with f13. Also, I think I've found a similar bug as that of mine

https://bugzilla.redhat.com/show_bug.cgi?id=650341

That one is with f14 though - but similar issue.
Can't find any other similar bugs though - so I could still be wrong.



-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers


Note You need to log in before you can comment on or make changes to this bug.