Select to view content in your preferred language

Problem Unzipping file zipped with python

2370
1
Jump to solution
02-04-2014 02:02 AM
FranciscoBereciartu
Occasional Contributor
Hi all!!!

I have this problem, I use a Geoprocess Service to extract data to a SHP file and when it's over within the same geoprocess I call another python script to "ZIP" those generated files. When I try to read that ZIP file in my Flex Viewer application I receive this error:

Error: invalid block type (type == 3)
at com.cesan.common.files.zip::Inflater/inflate()
at com.cesan.common.files.zip::ZipFile/getInput()

I've made some tests and I find out that if I extract the files to a folder later on then zip them with an external tool like WINRAR, it actually works and the Flex can read that ZIP with no problem.

I'm using the zipFile library and using the example of ESRI to zip the file, I'm also trying to do it with an external application, "7z", after the creating is complete in the same geoprocess and gave me the above error... I'm clueless about what I'm doing wrong  or what happens in the process. If someone have or had any advice I really appreciate it!!! It is urgent!!!


Thank you in advance for your help!!!
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
FranciscoBereciartu
Occasional Contributor
Update...

I work around this problem with the geoprocessing zipping the files using C# and now it works great. The problem must be with some of the process creating a SHP with the python script that doesnt free some resources or something like that and does not allow me to zip the files, correctly, after the process is over.


Hi all!!!

I have this problem, I use a Geoprocess Service to extract data to a SHP file and when it's over within the same geoprocess I call another python script to "ZIP" those generated files. When I try to read that ZIP file in my Flex Viewer application I receive this error:

Error: invalid block type (type == 3)
at com.cesan.common.files.zip::Inflater/inflate()
at com.cesan.common.files.zip::ZipFile/getInput()

I've made some tests and I find out that if I extract the files to a folder later on then zip them with an external tool like WINRAR, it actually works and the Flex can read that ZIP with no problem.

I'm using the zipFile library and using the example of ESRI to zip the file, I'm also trying to do it with an external application, "7z", after the creating is complete in the same geoprocess and gave me the above error... I'm clueless about what I'm doing wrong  or what happens in the process. If someone have or had any advice I really appreciate it!!! It is urgent!!!


Thank you in advance for your help!!!

View solution in original post

0 Kudos
1 Reply
FranciscoBereciartu
Occasional Contributor
Update...

I work around this problem with the geoprocessing zipping the files using C# and now it works great. The problem must be with some of the process creating a SHP with the python script that doesnt free some resources or something like that and does not allow me to zip the files, correctly, after the process is over.


Hi all!!!

I have this problem, I use a Geoprocess Service to extract data to a SHP file and when it's over within the same geoprocess I call another python script to "ZIP" those generated files. When I try to read that ZIP file in my Flex Viewer application I receive this error:

Error: invalid block type (type == 3)
at com.cesan.common.files.zip::Inflater/inflate()
at com.cesan.common.files.zip::ZipFile/getInput()

I've made some tests and I find out that if I extract the files to a folder later on then zip them with an external tool like WINRAR, it actually works and the Flex can read that ZIP with no problem.

I'm using the zipFile library and using the example of ESRI to zip the file, I'm also trying to do it with an external application, "7z", after the creating is complete in the same geoprocess and gave me the above error... I'm clueless about what I'm doing wrong  or what happens in the process. If someone have or had any advice I really appreciate it!!! It is urgent!!!


Thank you in advance for your help!!!
0 Kudos