[osgeo4w-dev] [osgeo4w] #410: xerces-c-vc9 contians a funny tar file that core python libs can not decompress

OSGeo4W trac_osgeo4w at osgeo.org
Mon Mar 24 21:11:37 PDT 2014


#410: xerces-c-vc9 contians a funny tar file that core python libs can not
decompress
--------------------+-------------------------------------------------------
Reporter:  jpalmer  |       Owner:  osgeo4w-dev@…              
    Type:  defect   |      Status:  new                        
Priority:  major    |   Component:  Package                    
 Version:           |    Keywords:                             
--------------------+-------------------------------------------------------
 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.

-- 
Ticket URL: <https://trac.osgeo.org/osgeo4w/ticket/410>
OSGeo4W <http://trac.osgeo.org/osgeo4w>
OSGeo4W is the Windows installer and package environment for the OSGeo stack.


More information about the osgeo4w-dev mailing list