New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failure in 'Looking for ctypes DLLs' when specifying 'ctypes' as a hidden import. #3825
Comments
Perhaps this is related to: https://bitbucket.org/ronaldoussoren/altgraph/pull-requests/4/default/diff |
This link is not public. Can't access it. |
I'm having this same issue. Project on python 2, getting this exception when importing this module. Anyone knows some workaround ? |
If `ctypes` is (manually) added to hidden imports under python 3.7, one of `referers` entries processed in `get_co_using_ctypes()` method of `PyiModuleGraph` ends up being None. This in turn causes error when its `identifier` property is accessed, causing pyinstaller#3825. Work around the problem by explicitly skipping `None` entries. Fixes pyinstaller#3825.
@Shincham Python 2 is not supported anymore, and PyInstaller versions that support it are not supported anymore, either. But you can backport and apply the fix from the linked PR to your PyInstaller installation. |
Thanks for the reply and for the workaround. I copied your change on the commit to my localfile and it solved my problem. Module was succesfully bundled and also stopped the runtime error. But it's not possible to include this change in the pyinstaller 3.6 version ? This change will only go to the version 4+ ? |
Indeed, it will go only into next release. We don't do multi-version branching and releases. |
If `ctypes` is (manually) added to hidden imports under python 3.7, one of `referers` entries processed in `get_co_using_ctypes()` method of `PyiModuleGraph` ends up being None. This in turn causes error when its `identifier` property is accessed, causing #3825. Work around the problem by explicitly skipping `None` entries. Fixes #3825.
With
hiddenimports=["ctypes"]
, I get the following exception:On the other hand, when I needlessly
import ctypes
in my main script, everything works like a charm.I want to set
ctypes
as a hidden import because it is required bybearlibterminal
, a Python dependency that I add manually to work around #3584.The text was updated successfully, but these errors were encountered: