Question

ZipExtractor alternative

  • 14 October 2019
  • 8 replies
  • 4 views

Userlevel 6
Badge +32

I use the ZipExtractor and ZipArchiver custom transformers by @takashi from the Hub on FME Server 2016 for multiple processes. Now we are migrating to FME Server 2019 and these are not sustainable because of Python incompatibility. I found the FileCopyWriter can work as an alternative for the ZipArchiver. Does an alternative for the ZipExtractor exist?

The alternative is I try to upgrade the ZipExtractor to Python to 3.x but as my Python-fu is not amazing...

I know Readers can read directly from Zip but my current proces unzips the entire Zipfile and then processes the different unzipped files.


8 replies

Badge +21

- Creator

- FeatureReader (Directory and file pathnames) and point to the zip-file

you will get one feature per file within the zipfile

- FeatureWriter (FileCopy) and set an outputcatalgue.

 

So you can use the Directory and file pathnames to read files within the zipfile and filcopy to write them to the destination folder.

Userlevel 6
Badge +32

- Creator

- FeatureReader (Directory and file pathnames) and point to the zip-file

you will get one feature per file within the zipfile

- FeatureWriter (FileCopy) and set an outputcatalgue.

 

So you can use the Directory and file pathnames to read files within the zipfile and filcopy to write them to the destination folder.

Many thanks @sigtill!

Userlevel 2
Badge +17

I think both ZipExtractor and ZipArchiver work with Python 3.x interpreter too.

Userlevel 6
Badge +32

I think both ZipExtractor and ZipArchiver work with Python 3.x interpreter too.

Not sure how to check, but when I load it I get the "Python Version Compatibility Mismatch" screen.

Userlevel 2
Badge +17

The warning message appears when adding the transformer which was created with Python 2.7 environment and FME Workbench changes the Python Compatibility parameter to Pyhon 2.7, but you can re-set the parameter to Python 3.x manually after adding the transformer.

Userlevel 2
Badge +17

I think both ZipExtractor and ZipArchiver work with Python 3.x interpreter too.

The warning message appears when adding the transformer which was created with Python 2.7 environment and FME Workbench changes the Python Compatibility parameter to Pyhon 2.7, but you can re-set the parameter to Python 3.x manually after adding the transformer.

Userlevel 6
Badge +32

The warning message appears when adding the transformer which was created with Python 2.7 environment and FME Workbench changes the Python Compatibility parameter to Pyhon 2.7, but you can re-set the parameter to Python 3.x manually after adding the transformer.

Very nice, many thanks for the addition. I always get confused and not sure what happens with Python related errors.

Userlevel 6
Badge +32

I think both ZipExtractor and ZipArchiver work with Python 3.x interpreter too.

@takashi if you convert the comment to answer I can mark it as the correct answer.

Reply