简体   繁体   中英

python 2.5 error on unzip large dbf file

So, I have a directory of rather large, zipped, shapefiles. I currently have code in python 2.5 that will unzip most of the files (ie all of the shapefile component parts .shp, .prj, .dbf...) but I run into occational problems unzipping some .dbf files.

These files area generally quite large when I have a problem with them (eg 30 MB) but the file size does not sem to be an overarching problem with the unzipping process as sometimes a smaller file will not work.

I have looked at possible special characters in the file path (it contains "-" and "/") but this seems not to be an issue with other .dbf files. I have also looked at the length of the file path, also not an issue as other long file paths do not present a problem.

7Zip will unzip the .dbf files I have issues unzipping with python unzip so the files are not corrupt.

I know a simple solution would be to unzip all of the files prior to running my additional processing in python but as they come in a zipped archive it woukld be most convenient not to have to do this.

Thoughts appreciated.

Two possible candidate problems: the file to extract is either empty, or is larger than 2Gb. Both of these issues were fixed in 2.6 or 2.7.

If neither of these is the case, putting one of the culprit zip archives somewhere public would help us track down the issue.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM