werkzeug.exceptions

847 views
Skip to first unread message

Ram

unread,
Sep 3, 2012, 9:04:04 PM9/3/12
to pyins...@googlegroups.com

Can anyone help me with this problem:

I can compile my project but when I run it I get the following exception:


Unhandled ImportError: No module named werkzeug.exceptions

Traceback (most recent call last):
  File "C:\cygwin\home\joe\project\build\build\pyi.win32\myprojConsole\out00-PYZ.pyz\twisted.internet.base", line 426, in _continueFiring
  File "C:\cygwin\home\joe\project\build\build\pyi.win32\myprojConsole\out00-PYZ.pyz\myproj.startup.instances._base", line 118, in _initialize
  File "C:\cygwin\tmp\pyinstaller_test\pyinstaller\PyInstaller\loader\pyi_iu.py", line 431, in importHook
    mod = self.doimport(nm, ctx, ctx + '.' + nm)
  File "C:\cygwin\tmp\pyinstaller_test\pyinstaller\PyInstaller\loader\pyi_iu.py", line 480, in doimport
    exec co in mod.__dict__
  File "C:\cygwin\home\joe\project\build\build\pyi.win32\myprojConsole\out00-PYZ.pyz\myproj.api", line 9, in <module>
  File "C:\cygwin\tmp\pyinstaller_test\pyinstaller\PyInstaller\loader\pyi_iu.py", line 386, in importHook
    mod = _self_doimport(nm, ctx, fqname)
  File "C:\cygwin\tmp\pyinstaller_test\pyinstaller\PyInstaller\loader\pyi_iu.py", line 480, in doimport
    exec co in mod.__dict__
  File "C:\cygwin\home\joe\project\build\build\pyi.win32\myprojConsole\out00-PYZ.pyz\flask", line 17, in <module>
  File "C:\cygwin\tmp\pyinstaller_test\pyinstaller\PyInstaller\loader\pyi_iu.py", line 409, in importHook
    raise ImportError("No module named %s" % fqname)

I've tried manually importing this module, tried adding hooks-werkzeug.expceptions.py with hiddenimports=['abort']

Can't seem to fix it,

Thanks,
--Ram

Ram

unread,
Sep 3, 2012, 9:50:38 PM9/3/12
to pyins...@googlegroups.com

I also tried --hidden-import=werkzeug.exceptions --noupx --onedir

But still get the same error. 

Martin Zibricky

unread,
Sep 4, 2012, 7:35:36 AM9/4/12
to pyins...@googlegroups.com
Ram píše v Po 03. 09. 2012 v 18:04 -0700:
> I've tried manually importing this module, tried adding
> hooks-werkzeug.expceptions.py with hiddenimports=['abort']

hook should probably look different:

hook-werkzeug.py:

hiddenimports=['werkzeug.exceptions']

But you should look at the werkzeug code what magic it does to import
modules dynamically.

Another option is to look in the 'site-package' directory how werkzeug
is installed - if it's as zipped or unzipped egg.

Reply all
Reply to author
Forward
0 new messages