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
PyInstaller fails to load Werkzeug modules #602
Comments
Original date: 2012/09/05 Agreed. I've run into this same issue. I'm not familiar enough with pyinstaller to know how the lazy loading affects it, but it would definitely be nice if this was handled. Thanks for posting a workaround though. |
@Bluehorn: Is it you who opened this issue originally at the old trac-instance? If so: Is this still an issue with PyInstaller 3.1.1? |
@htgoebel: Yep, that's me. I will check if this works in PyInstaller 3.1.1. We are still at our fork from PyInstaller trunk from years ago because we have a lot of local fixes. Not sure if we will upgrade before our switch to CPython 3 which is likely to take a few more years... |
Just checked with PyInstaller 3.1.1 and the resulting binary worked just fine. |
It's time to finally fix or close this issue. |
AFAICT this has been fixed long ago. I can't close the ticket though as I am not listed as the creator on github: The ticket was ported over from trac. |
Original date: 2012/09/04
Original reporter: torsten DOT landschoff AND dynamore DOT de
I am trying to deploy an application that uses Werkzeug but I am unable to get PyInstaller to include the werkzeug.* modules. Look at this example:
Obviously this works fine when called directly from Python. Using pyinstaller on test.py without any options gives an executable which acts like this:
I created a hook to make PyInstaller include the werkzeug submodules and placed it into the directory hookspath. I enabled that hook by modifying the generated test.spec to include
But I noticed that this does not make a difference for the build result: The file logdict2.7.3.final.0-2.log is unchanged. In fact, the original version also contains the werkzeug.exceptions module (verified with ArchiveViewer.py).
Why this module can not be loaded is beyond me. I enabled the debug output of iu.py and will attach that file. Perhaps somebody with more insight into PyInstaller internals can go and fix the loader.
The only workaround I found was to replace the init.py in the werkzeug package to remove the lazy load feature by commenting out the last lines so that new_module is not written into sys.modules["werkzeug"].
The text was updated successfully, but these errors were encountered: