python-3.x - 有什么方法可以知道运行冻结的应用程序时发生了什么错误 - cx_Freeze
问题描述
我刚刚用 cx_Freeze 冻结了我的程序。当我尝试运行它时,它只是停止而没有显示任何错误消息,所以我想知道是否有任何方法可以知道我的程序或冻结脚本有什么问题:
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)
解决方案
尝试在cmd
提示符下使用以下命令将可执行文件的输出重定向到文件中:
TaskManager.exe > out.txt
然后可以查看输出文件的内容,例如:
type out.txt
输出文件可能包含与Win32GUI
基础冻结的应用程序有关的其他错误消息。
推荐阅读
- python - ModuleNotFoundError:安装 pyarrow 时没有名为“Cython”的模块
- wpf - 更改基于/继承样式中的触发器顺序
- html - Typescript Angular 5向组件动态添加css
- java - 不能在类上使用 lombok @NoArgsConstructor
- python - 同时读取多个 .csv 文件
- javascript - 如何防止用户离开我的页面
- java - 将数据从servlet发送到jsp?
- android - tensorflow 的对象检测应用演示中的“org.tensorflow.demo.R”是什么意思?
- sprite-kit - SpriteKit如何检测节点是否正在移动
- php - 如何使 URL 显示为与 https 的链接以及 php 中 http 的当前代码?