Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Release 1.16.3 breaks building executable with pyinstaller #1600

Open
Flydroid opened this issue Apr 21, 2021 · 1 comment
Open

[BUG] Release 1.16.3 breaks building executable with pyinstaller #1600

Flydroid opened this issue Apr 21, 2021 · 1 comment

Comments

@Flydroid
Copy link

Flydroid commented Apr 21, 2021

Environment:

dash                      1.16.3
dash-bootstrap-components 0.10.5
dash-core-components      1.12.1
dash-daq                  0.5.0
dash-html-components      1.1.1
dash-renderer             1.8.2
dash-table                4.10.12

and

pyinstaller               4.3
pyinstaller-hooks-contrib 2021.1

Describe the bug

Using Dash 1.16.3, the app is compiled to an executable with pyinstaller.
When the app is executed it fails with:

Traceback (most recent call last):
File "CSB-Interface-App.py", line 9, in
File "", line 991, in _find_and_load
File "", line 975, in find_and_load_unlocked
File "", line 671, in load_unlocked
File "PyInstaller\loader\pyimod03_importers.py", line 531, in exec_module
File "dash_init
.py", line 5, in
File "", line 991, in find_and_load
File "", line 975, in find_and_load_unlocked
File "", line 671, in load_unlocked
File "PyInstaller\loader\pyimod03_importers.py", line 531, in exec_module
File "dash\dash.py", line 53, in
File "pkg_resources_init
.py", line 466, in get_distribution
File "pkg_resources_init
.py", line 342, in get_provider
File "pkg_resources_init.py", line 886, in require
File "pkg_resources_init.py", line 772, in resolve
pkg_resources.DistributionNotFound: The 'flask-compress' distribution was not found and is required by the application
[21652] Failed to execute script CSB-Interface-App

When instead Dash 1.16.2 is used the compiled app starts as expected.

Dash 1.16.3 included a fix for #1424 which seems to break the running of the executable compiled with pyinstaller.

@Flydroid Flydroid changed the title Release 1.16.3 breaks building executable with pyinstaller[BUG] [BUG] Release 1.16.3 breaks building executable with pyinstaller Apr 21, 2021
@yankee14
Copy link

yankee14 commented Sep 23, 2021

Can confirm, dash does not seem to work with pyinstaller for any dash version newer than 1.16.2 (September 2020).

The error I'm getting when trying to use the more recent versions of dash (1.21.0 in my case) seems to be because not all dash components are getting included by pyinstaller --onefile, or they are not getting decompressed from the binary properly. The webserver starts successfully, but it throws an error because the directory .....\Temp\_MEIXXX\dash does not get created.

It also could be because of mixing up Windows and Linux os.pathsep styles. I'm not sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@Flydroid @yankee14 and others