Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cx-Freeze Error - Python 34

I have a Cx_Freeze setup file that I am trying to make work. What is terribly frustrating is that it used to Freeze appropriately. Now, however, I get the following error:

edit. the error that shows up is not a Python exception through the console, but a crash report when attempting to launch the resulting exe file generated through the freeze.

'File 'notetest.py', line 1, in _find_and_load importlib_bootstrap.py, line 2214

....

AttributeError 'module' object has no attribute '_fix_up_module'

My setup.py file follows:

    import sys
import os
from cx_Freeze import setup, Executable

build_exe_options = {'packages': [], 'excludes' : []}
base = 'Win32GUI'
exe = Executable(
    script = 'notetest.py',
    initScript = None,
    base = 'Win32GUI',
    targetName = 'MedicaidAid.exe',
    compress = True,
    appendScriptToExe = True,
    appendScriptToLibrary = True,
    icon = None
)

setup( name = 'MedicaidAid', 
        version = '0.85',
        description = 'MedicaidAid Software',
        options = {'build_exe': build_exe_options},
        executables = [Executable('notetest.py', base = base)])
like image 452
Spencer Bates Avatar asked May 28 '14 19:05

Spencer Bates


2 Answers

You should install cx_freeze from this site. It contains an important patch that solves the problem (see this discussion for detailed).

like image 162
NorthCat Avatar answered Nov 08 '22 20:11

NorthCat


Apparently this is a known issue with Cx_Freeze. BitBucket.

Apparently there is a compiling error that occurs. The bitbucket link lists the work-arounds.

like image 43
Spencer Bates Avatar answered Nov 08 '22 20:11

Spencer Bates