I successfully recovered some PYC files from an ELF built by PyInstaller (https://github.com/extremecoders-re/pyinstxtractor/wiki/Extracting-Linux-ELF-binaries). There is a PYZ archive in the dump. I tried to use pyi-archive_viewer to open and/or extract some modules from the PYZ. I receive an AttributeError "ZlibArchive object has no attribute open openEmbedded."

The error occurs on line 134 of the source (https://github.com/pyinstaller/pyinstaller/blob/develop/PyInstaller/utils/cliutils/archive_viewer.py)

I believe something is incorrectly parsed/output during extraction...? Has anyone else seen this?

1 Answer 1


For anyone else this happens to... Ensure you use the same Python version as the original author.

That is, I originally created the ELF with Python 3.7. But I tried the reversing process on a different machine - with Python 3.8. Learn from my mistake!

  • I'm curious on how did you discover that it was a mismatching Python version issue? Was it coincidence? Or you've done some kind of static analysis to the source code of the python files and figured it out? Mar 7, 2021 at 9:46
  • 1
    a dash of trial and error, and a dash of reading the python release notes. though I cannot recall what tipped me off in the latter :/
    – armor
    Mar 14, 2021 at 23:31
  • That was definitely a nice and thorough learning experience, thanks for sharing the answer! Mar 15, 2021 at 5:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.