Skip to main content
Question

ZipExtractor alternative

  • October 14, 2019
  • 8 replies
  • 89 views

nielsgerrits
VIP
Forum|alt.badge.img+60

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.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

8 replies

sigtill
Supporter
Forum|alt.badge.img+25
  • Supporter
  • 956 replies
  • October 14, 2019

- 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.


nielsgerrits
VIP
Forum|alt.badge.img+60
  • Author
  • 2939 replies
  • October 14, 2019

- 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!


takashi
Celebrity
  • 7843 replies
  • October 14, 2019

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


nielsgerrits
VIP
Forum|alt.badge.img+60
  • Author
  • 2939 replies
  • October 14, 2019

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.


takashi
Celebrity
  • 7843 replies
  • October 14, 2019

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.


takashi
Celebrity
  • 7843 replies
  • October 14, 2019

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.


nielsgerrits
VIP
Forum|alt.badge.img+60
  • Author
  • 2939 replies
  • October 14, 2019

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.


nielsgerrits
VIP
Forum|alt.badge.img+60
  • Author
  • 2939 replies
  • October 14, 2019

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.