PyInstaller with Dash Daq

I am running my app for distribution with a local server. I am using the dash_daq import. When using PyInstaller, I was getting an error that my.exe\dash_daq\package-lock.json was missing. I added a hook to the hooks directors named hook-dash-daq.py It is important that the name of the file is prepended with hook I discovered. This is the contents. I probably didn’t need the .css and .js but I included it anyway. Fixed my issue. I can now run a locally served Dash app.

from PyInstaller.utils.hooks import collect_all

datas, binaries, hiddenimports = collect_all(‘dash_daq’, include_datas=[‘.json’, '.css’, ‘*.js’])

1 Like