Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#410 closed defect (fixed)

xerces-c-vc9 contians a funny tar file that core python libs can not decompress

Reported by: jpalmer Owned by: osgeo4w-dev@…
Priority: major Component: Package
Version: Keywords:
Cc:

Description

The xerces-c-vc9-3.1.1-3-devel.tar.bz2 tar file in the x86\release\xerces-c folder seems to be compressed in a way that stops python from decompressing it. All other files on the site are fine but this one returns the following error:

import bz2
import tarfile

file ='xerces-c-vc9-3.1.1-3-devel.tar.bz2'
bzf = bz2.BZ2File(file)
try:
   tarf = tarfile.TarFile(fileobj=bzf)
   tarf.extractall(working)
finally:
   bzf.close()

File "build_nsis.py", line 94, in <module>

tarf = tarfile.TarFile(fileobj=bzf)

File "C:\OsGeo4W-LINZ\apps\Python27\lib\tarfile.py", line 1574, in init

self.firstmember = self.next()

File "C:\OsGeo4W-LINZ\apps\Python27\lib\tarfile.py", line 2319, in next

tarinfo = self.tarinfo.fromtarfile(self)

File "C:\OsGeo4W-LINZ\apps\Python27\lib\tarfile.py", line 1239, in fromtarfile

buf = tarfile.fileobj.read(BLOCKSIZE)

IOError: invalid data stream

I've double checked my downloaded file and it ok. tools like tar and 7z can actually decompress the tar.

Change History (2)

comment:1 by jef, 10 years ago

Resolution: fixed
Status: newclosed

despite the name the archive was gzipped instead of bzip2ed. fixed in 3.1.1-4

comment:2 by jpalmer, 10 years ago

Thanks!

Note: See TracTickets for help on using tickets.