pyintaller dosent want to work with patoolib #8383
Replies: 1 comment
|
The problem is how the hook is being supplied. Keep your hook named # hooks/hook-patoolib.py
from PyInstaller.utils.hooks import collect_submodules
hiddenimports = collect_submodules("patoolib.programs")Then replace the incorrect Keep the other icon/data options and the final Alternatively, without a custom hook, add This addresses the shown I checked the hook-loading documentation against your command and traceback; I have not built or run your application. |
Uh oh!
There was an error while loading. Please reload this page.
so I have a py program that uses patoolib to extract a file and in pycharm it works fine but when I use pyinstaller it dosent want to work.
pyinstaller --noconfirm --onedir --console --icon "C:/Users/Administrator/Documents/IT/Python/pythonProject3/data/worldtorrent.ico" --add-data "C:/Users/Administrator/Documents/IT/Python/pythonProject3/data;data/" --add-data "C:/Users/Administrator/Documents/IT/Python/pythonProject3/config.ini;." --hidden-import "C:/Users/Administrator/Documents/IT/Python/pythonProject3/hook-patoolib.py" # I put the directory to the hidden imports "C:/Users/Administrator/Documents/IT/Python/pythonProject3/main.py"3. Error:
I also tried with a smaller one:
hiddenimports = ['patoolib.programs', 'patoolib.programs.ar', 'patoolib.programs.arc', 'patoolib.programs.p7zip']All reactions