AttributeError: 'FrozenImporter' object has no attribute 'filename' error on executing exe

Hello,

I have created an exe of my dash application using Pyinstaller. When I try to execute the exe, I get the following error.
Traceback (most recent call last):
File “dasheditrowcopy.py”, line 126, in
File “site-packages\dash\dash.py”, line 1901, in run_server
File “site-packages\dash\dash.py”, line 1712, in enable_dev_tools
File “site-packages\dash\dash.py”, line 1709, in
AttributeError: ‘FrozenImporter’ object has no attribute ‘filename’
[19320] Failed to execute script dasheditrowcopy

It happens when dev_tools_hot_reload=True

Also, the dash packages do not copied automatically while creating the exe using Pyinstaller and I have to do it manually. Can someone please help with this

hi,have your problem be solved? the same problem with you

app.run_server(debug=False)

But can’t use Debug mode!
Is there a better way to solve this problem?

Any luck finding a way to solve this problem without turning off the debug?

The solution that worked for me was to add “–debug all” to my pyinstaller command. Best of luck to anyone else who encounters this issue, hope it works for you. got the solution form this document https://pyinstaller.org/en/stable/usage.html#cmdoption-additional-hooks-dir