cloudmatrix / esky

an auto-update framework for frozen python apps
BSD 3-Clause "New" or "Revised" License
362 stars 74 forks source link

unable to run bootrap file using py2exe and python3.4 #131

Closed timeyyy closed 6 years ago

timeyyy commented 8 years ago

original issue posted from @topic2k

On python3 the script is freezed/zipped, but when i run it, it chrashes and gives me this error

Fatal Python error: Py_Initialize: unable to load the file system codec
ImportError: No module named 'encodings'

This error is with the bootstrap exe. The exe in the subfolder runs fine.

related to #104 but for windows

timeyyy commented 8 years ago

Originally posted by @rfk

Over in #104, we figured out a minimal set of modules that must be available to python during its startup sequence. I think this is a new requirement for python3, related to bootstrapping the io module and sys.stdin and similar. The list is:

_weakrefset.pyc abc.pyc     codecs.pyc  encodings   io.pyc

So, we need to find a way to make these available to the py2exe bootstrap exe. This probably means creating a library.zip or similar in the top-level bootstrap env, or perhaps appending them to the bootstrap executable itself. Unfortunately I don't have access to a windows box at the moment, but if anyone's feeling adventurous, I can give you some pointers on how move ahead with this.

In fact, there's a comment in f_py2exe that says "There's no need to copy library.zip into the bootstrap env...". One way to see if this will help fix the problem, would be to copy the library.zip from the version subfolder into the bootstrap env, and see if that lets things run.

timeyyy commented 8 years ago

@rfk

Any other ideas and what could be causing this?

Two interesting pieces of info:

just as a reference in case you want to see how the structure of esky is

https://github.com/cloudmatrix/esky/wiki/How-Esky-Works

before an initial update though it looks a bit different, the appdata doesn't exist and our app version resides in a folder someapp-0.1.win-32

timeyyy commented 8 years ago

116 is also to do with the bootstrap not working when a particular module is present

rfk commented 6 years ago

Unfortunately this project is no longer actively maintained, so I'm going to move it into archive mode:

https://rfk.id.au/blog/entry/archiving-open-source-projects/