1

I just finished freezing my program with cx_Freeze. When I try to run it, it just stops without showing any error messages, so I want to know if is there any way to know what's wrong with my program or my freezing script:

import sys, os
from cx_Freeze import setup, Executable
PYTHON_INSTALL_DIR = os.path.dirname(os.path.dirname(os.__file__))

sys.path.append('pandastable')

includes = ["pandastable"]
includefiles = [
                os.path.join(PYTHON_INSTALL_DIR, 'DLLs', 'tk86t.dll'),
                os.path.join(PYTHON_INSTALL_DIR, 'DLLs', 'tcl86t.dll'),'ClasseAgents.py','ClasseData.py','ClassePerformance.py','ClasseTime.py','ClasseTraitement.py','PredictionFlux.py','icone.ico','VCbase.db'
                ]

# Dependencies are automatically detected, but it might need fine tuning.
build_exe_options = {"packages": ["os","numpy","matplotlib","pandas",
                                  #"scipy","seaborn","IPython","statsmodels",
                                  "pandastable"],
                     "excludes": ['seaborn','statsmodels'],
                     "namespace_packages": ['mpl_toolkits'],
                     "include_msvcr": True,
                     "includes": includes,
                     "include_files": includefiles}

base = None
if sys.platform == "win32":
    base = "Win32GUI"

executables = [Executable("Main.py", base=base,
                          #copyDependentFiles = True,
                          targetName='TaskManager.exe',
                          shortcutName="TakManaer",
                          shortcutDir="DesktopFolder",
                          icon="icone.ico")]

setup(  name = "Task manager for BPO",
    version = "1.0",
    description = "task manager est un gestionnaire de traitement intelligent",
    options = {"build_exe": build_exe_options},
    executables = executables)
jpeg
  • 2,372
  • 4
  • 18
  • 31
  • 1
    Have you tried to start your frozen .exe from within a terminal/cmd prompt? Sometimes one gets more error messages there. – jpeg Mar 01 '21 at 08:17
  • Yes but it does not give any erro messages – Tojo Randrianarimanana Mar 01 '21 at 14:54
  • 1
    Do you see any relevant error message or warning in the output while freezing the script? If not, maybe [my answer](https://stackoverflow.com/a/54821960/8516269) to a similar question can give you some further hints, see especially point 3 there and at the end the general advice on how to proceed. – jpeg Mar 03 '21 at 07:28

1 Answers1

0

Try to redirect the output of your executable into a file with the following command in a cmd prompt:

TaskManager.exe > out.txt

The content of the output file can then be viewed e.g. with:

type out.txt

The output file might contain additional error messages for applications frozen with the Win32GUI base.

jpeg
  • 2,372
  • 4
  • 18
  • 31