i was able to create a standalone python dash app on mac OS and it runs perfectly with cx_Freeze however when i repeat the process on widows it gives me an error during runtime: “AttributeError: ‘NoneType’ object has no attribute write”, is there any way to solve this issue or another way of freezing the application? i have tried py2exe and PyInstaller with no luck, any help would be appreciated, thanks in advance.
below are the images of the program running on mac with the output:
and the same program with an error on windows.
i used the command python setup.py build in CMD and Terminal below attached is the setup file written in python, the program is too large to post here but if any part of it needed i can provide
from cx_Freeze import setup, Executable
import sys
buildOptions = dict(
packages=["dash_core_components", "dash_html_components", "dash.dependencies", "dash", "dash_table", "flask",
"numpy", "pandas", "plotly.figure_factory", "plotly.express", "jinja2", "sys", "_datetime", "io",
"plotly.graph_objects", "xlrd", "plotly"],
excludes=[],
include_files=["Test.xlsx/"]
)
base = 'Win32GUI' if sys.platform == 'win32' else None
executables = Executable(script='FISE MGMT App.py',
base=base,
icon='icon.ico'
)
setup(name='hadi',
version='1.0',
description='my app',
options=dict(build_exe=buildOptions),
executables=[executables])
EDIT: so i figured out that the issue was because my base was set to Win32GUI instead of none when using windows, although that works, I would like a way where the CMD does not open on startup is there a way to do that without getting that ‘write’ attribute error?