JackMcKew / pyinstaller-action-windows

Github Action for building executables with Pyinstaller
MIT License
168 stars 67 forks source link

TypeError: __init__() got an unexpected keyword argument 'hooksconfig' #18

Closed cjlynch278 closed 1 year ago

cjlynch278 commented 2 years ago

When using the main.spec file generated from the pyinstaller run, I get the following error when running the build during the pyinstaller step - TypeError: init() got an unexpected keyword argument 'hooksconfig'.

Here's the erroneous part of my .spec file:

a = Analysis(['__main__.py'],
               pathex=['C:\\Users\\christopher164141\\PycharmProjects\\SqlMetadata\\src'],
               binaries=[],
               datas=[],
               hiddenimports=[],
               hookspath=[],
               runtime_hooks=[],
               hooksconfig={},
               excludes=[],
               win_no_prefer_redirects=False,
               win_private_assemblies=False,
               cipher=block_cipher,
               noarchive=False)

To fix the issue I simply removed the "hooksconfig={}," line from the .spec file.

The action works as expected now, but I figured I'd document the issue for others running into the problem. Thanks creating this project, it works great for me!

porridge commented 2 years ago

Faced the same issue today, and the workaround of removing that kwarg helped. My .spec file was created with pyinstaller 4.6. It would be great if @JackMcKew could document what versions of pyinstaller are tested/supported.

JackMcKew commented 2 years ago

The source dockerfile specifies which versions of python/pyinstaller are used

https://hub.docker.com/r/cdrx/pyinstaller-windows

jdev082 commented 2 years ago

I am experiencing this issue and can't figure out how to fix it. https://github.com/JaydenDev/AuraPad

cjlynch278 commented 2 years ago

I am experiencing this issue and can't figure out how to fix it.

https://github.com/JaydenDev/AuraPad

Remove the "hooksconfig ={}" line from your aurapad.spec file and rerun, it should go

jdev082 commented 2 years ago

I am experiencing this issue and can't figure out how to fix it. https://github.com/JaydenDev/AuraPad

Remove the "hooksconfig ={}" line from your aurapad.spec file and rerun, it should go

k

SaffatHasan commented 2 years ago

The source dockerfile specifies which versions of python/pyinstaller are used

https://hub.docker.com/r/cdrx/pyinstaller-windows

Looks like the base image is using version 3.6 but PyInstaller is currently at version 5.1

JackMcKew commented 1 year ago

Please try the solution in the thread: https://github.com/JackMcKew/pyinstaller-action-windows/issues/34