This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author orsenthil
Recipients Valentin.Lorentz, amaury.forgeotdarc, eric.araujo, orsenthil, progval
Date 2010-11-25.11:38:59
SpamBayes Score 1.0761126e-07
Marked as misclassified No
Message-id <1290685141.95.0.669915134969.issue10362@psf.upfronthosting.co.za>
In-reply-to
Content
If you want to quickly solve this, do like this:

import urllib
import tarfile

tarfile.open(urllib.urlretrieve('http://plugins.supybot-fr.tk/GoodFrench.tar')[0], mode='r:') # Works

The problem is tarfile is expecting a "file-object" with a tell method for seeking, whereas urllib2 returns a file-like object, which does have a tell method. It seems to not have because, the underlying socket._fileobject is not exposing one (for whatever reason). Let me try to figure out reason for fixing/closing this bug.
(BTW, http module is relying on .tell() of the socket._fileobject too and I wonder it did not get noticed earlier because the has not taken that path yet? Strange!)
History
Date User Action Args
2010-11-25 11:39:02orsenthilsetrecipients: + orsenthil, amaury.forgeotdarc, eric.araujo, progval, Valentin.Lorentz
2010-11-25 11:39:01orsenthilsetmessageid: <1290685141.95.0.669915134969.issue10362@psf.upfronthosting.co.za>
2010-11-25 11:38:59orsenthillinkissue10362 messages
2010-11-25 11:38:59orsenthilcreate