zc.recipe.cmmi untar fails on windows due to incorrect saving

Bug #261367 reported by Dylan Jay
2
Affects Status Importance Assigned to Milestone
Buildout
New
Undecided
Unassigned

Bug Description

Something strange is happening with cmmi on windows to do with the download and save step.

open(fname, 'w').write(urllib2.urlopen(url).read())

I get strange unpacking errors like

zlib.error: Error -3 while decompressing: invalid literal/lengths set

or

error: Error -3 while decompressing: invalid distance too far back

The reason is the file size of the tgz file in the download cache is different than if I just download it myself. 1 byte different. And if I put the wget downloaded version into the download cache then the unpack works fine.

I have patched it so that open uses 'wb' instead of 'w' and that fixes the problem on windows. not sure about other oses

Revision history for this message
Dylan Jay (t-launchpad-dylanjay-com) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.