2

i have a larger project, based on python. there are some external modules like cement, PIL or boto3 in it as well as some own coded modules. everything working fine as it should.

my idea now was to compile the whole application to a single binary with pyinstaller. so i set up a docker container with ubuntu 14 (same version and 64 bit as on the server, where the script should be running in production). the compilation of the project was done with

pyinstaller --onefile app.py

After compiling the script works perfectly - but only on docker machines (i have tested this on several linux distributions and versions, no problem everywhere running fine).

After i put the script on the working server i got the error message:

Error -3 from inflate: incorrect header check
Error decompressing PIL._imaging.so
Failed to write all bytes for PIL._imaging.so

So i put it on 2 other servers based on Linux Ubuntu, where i got the same error.

My first idea was that there is a problem with the module which was mentioned in the error message. So i created a really stupid demo .py script which was just using the core os module and printed out some strings.

Again the binary worked fine on every of my docker containers but NOT on the servers. Now i got a similar error, which was:

Error -3 from inflate: incorrect header check
Error decompressing _bz2.so
Failed to write all bytes for _bz2.so

Has somebody had the same problem with that, or knows what is the problem here?

My Python Version i am using for compiling is 3.3 (is supported by Pyinstaller)

Thanks very much in advance

cpassion
  • 21
  • 3

0 Answers0