miracle2k / webassets

Asset management for Python web development.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Load_builtin_filters doesn't work as expected with PyInstaller

monstrorivas opened this issue · comments

I have a Flask app that runs fine from python. I'm trying to get an executable out of it but the app fails to load the web filters. Upon inspection, I narrowed it down to the file ./webassets/filter/__init__.py. It seems that the following line (under def load_builtin_filters()) doesn't pick up the modules in PyInstaller

    # special handling for PyInstaller
    importers = map(pkgutil.get_importer, __path__)

A print statement of importerts results in None
I manually pasted the module_names and run pyinstaller again that solved my problem. I'm opening an issue here to request a more permanent solution.

Versions used:
python ==3.6
webassets==0.12.1
PyInstaller==4.0.dev0+a1f92c6a08
Windows 10