Skip to main content

I ve got some problems with expandig of an Zipfile. With HTTPCaller i download the (free available) file "https://service.geo.llv.li/download//gwr/gwr_li.zip". after then i try it to expand with ZipExtractor. As a result it rejects it always with the error_message: "Unexpected error: File name in directory 'gwrli_Spaltenerklärung.pdf' and header b'gwrli_Spaltenerkl\\xe4rung.pdf' differ."

 

How can i resolve this?

Hi @olivierbeguin​, could you try the PDF reader instead?

 

You can do this by adding a PDF reader, and in the dropdown arrow next to the field 'Dataset', select Select File From Web > Specify URL. From there you can put in your url link and press OK. When you run the workspace, the reader will attempt to download your file and the reader will unzip the file for you.

 

It'll look something like this:

pdf_reader_specify_url_datasetAnd here's my result on default reader parameters:

result


Hello @olivierbeguin​ 

The error you are seeing is caused by a known bug/limitation of the zipfile Python library with certain zip files where a file name does not match the header. The ZipExtractor custom transformer uses the zipfile library for the extraction of files within the zip.

If you only need to read the PDF file within the .zip, then you can use the PDF reader as @jovitaatsafe​ mentions in their answer above.

If you wish to extract the entire contents of the zip file instead, you can use the Unzipper custom transformer instead. The zip extraction functionality of FME readers are more lenient than the Python zipfile library. Since the Unzipper uses an FME reader to perform the file extraction, it should handle your zip file without issue.


Hi @olivierbeguin​, could you try the PDF reader instead?

 

You can do this by adding a PDF reader, and in the dropdown arrow next to the field 'Dataset', select Select File From Web > Specify URL. From there you can put in your url link and press OK. When you run the workspace, the reader will attempt to download your file and the reader will unzip the file for you.

 

It'll look something like this:

pdf_reader_specify_url_datasetAnd here's my result on default reader parameters:

result

Thank you very much for this quick reply. I am interested on the csv-file inside the zip-file. As @debbiatsafe mentioned, i'll use the unzipper, which works perfectly for my needs.

 

Thank you for your help.


Reply