After some years of *django* usage i developed my last project using *
flask/werkzeug*. This lead to a problem i haven't thought of in the 
beginning. The application cannot be distributed with the help of *
pyinstaller*. Flask/Werkzeug is doing some "lazy" imports, which is not 
recognized by *pyinstaller* without additional help by the hooks package. 
The simple way naming the modules in the global *hiddenimports* array is not 
enough. The error i see when running the created *exe:*
*
*
File "d:\download\pyinstaller-1.5.1\iu.py", line 436, in importHook
mod = _self_doimport(nm, ctx, fqname)
File "d:\download\pyinstaller-1.5.1\iu.py", line 521, in doimport
exec co in mod.__dict__
 File 
"c:\users\tds\workspace\flask\tds_flask\build\pyi.win32\runserver\outPYZ1.pyz/flask",
 
line 17, in <module>
 File 
"c:\users\tds\workspace\flask\tds_flask\build\pyi.win32\runserver\outPYZ1.pyz/werkzeug",
 
line 119, in __getattr__
File "d:\download\pyinstaller-1.5.1\iu.py", line 454, in importHook
del sys.modules[fqname]
KeyError: 'werkzeug.exceptions'

A more complex hooks scenario is necessary, to solve this problem. But this 
is beyond my knowledge, not only because the documentation is minimal.

Is there someone with helpful hints for me?

TIA,
Wolf

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/pyinstaller/-/SqXRL5sE9VEJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pyinstaller?hl=en.

Reply via email to