2

I wrote a css-js minifier in Python 3.6, using the module https://github.com/juancarlospaco/css-html-js-minify and PyQt5 for GUI.

Then, I used cx_freeze to compile the .exe.

The .exe runs perfectly on my computer (windows 10), but crashes on windows 7.

Details on the error-log:

  • APPCRASH
  • exception code: 40000015
  • ucrtbase.DLL

Here is my setup.py for cx_freeze:

import os
import sys
import cx_Freeze

from app_info import APP_INFO

# have to make sure args looks right
sys.argv = sys.argv[:1] + ['build']

app_path = os.path.join(os.path.dirname(__file__), "src", "gui.py")

if sys.platform == 'win32':
    executables = [cx_Freeze.Executable(
        app_path,
        targetName=APP_INFO.APP_NAME + ".exe",
        icon=os.path.join('icons', 'icon.ico'),
        base="Win32GUI")]
else:
    executables = [cx_Freeze.Executable(
        app_path,
        targetName=APP_INFO.APP_NAME,
        icon=os.path.join('icons', 'icon.png'))]

include_files = [
    os.path.join("icons", 'icon.ico'),
    'C:\\Windows\\System32\\ucrtbase.dll'       
]

options = {
    'build_exe': {
        "include_files": include_files,
        "packages": ["asyncio"]

    }
}

cx_Freeze.setup(
    name=APP_INFO.APP_NAME,
    version=_get_ver_string(),
    executables=executables,
    options=options
)

Could it be caused by the usage of threads in the css-html-js-minify module ?

Thanks in advance for any ideas...

Rémy V.D
  • 250
  • 2
  • 12
  • Maybe I'm wrong but it looks like you are missing the DLL file in your exe which is what is causing the crash. Is that what you are seeing? – Joe Jun 27 '17 at 14:51
  • I tried adding the dll file in the folder, still crashing... – Rémy V.D Jun 28 '17 at 07:57
  • Here is a link to another question similar to this that I answered. You need to actually point at the DLL with the setup file not just stick it in the folder. cx_freeze is not capable of grabbing every dependency. [link](https://stackoverflow.com/questions/43568915/import-tkinter-if-this-fails-your-python-may-not-be-configured-for-tk/44556851#44556851) – Joe Jun 28 '17 at 13:26
  • added the 'C:\\Windows\\System32\\ucrtbase.dll' to my include_files, the dll is well included in the folder but still the same error... – Rémy V.D Jun 28 '17 at 14:29
  • Did you make your config look like mine? Share your new config maybe? Are you positive the file your adding is the one that your interpreter is looking at – Joe Jun 28 '17 at 14:44
  • I edited my question with my new setup file – Rémy V.D Jun 28 '17 at 15:32

0 Answers0