-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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
Recent version 2.28.2 cannot be used in PyInstaller because of missing charset_normalizer files #6331
Comments
Charset normalizer is a dependency of requests, not a project maintained by us. This presents another good reason to ditch it though and stop trying to auto detect character sets. We can't fix this for you since it's not our code. Closing as a result |
I'm disagree that this can't be fixed in requests code. The issue seems to be that the try except block around importing the charset_normalizer module doesn't work as intended under pyinstaller builds. Specifically, in compat.py
I see this throw a |
It's generally good practice to validate assumptions before asserting them as fact. It avoids unnecessary tangents and wasted time. try:
raise ModuleNotFoundError('module not found')
except ImportError as e:
print(f"Error Type: {type(e)}, {e}") The stack trace provided shows we are handling the During the handling of that import, PyInstaller is unable to resolve |
Oohh, please do. If an API is using a non UTF8 encoding without sending a |
for other people frantically trying to google this issue for PyInstaller, see the workaround in this comment pyinstaller/pyinstaller-hooks-contrib#534 (comment)
Thanks requests devs for all your hard work! |
The version that `JackMcKew/pyinstaller-action-windows@main` etc. uses has a [bug](psf/requests#6331) with its `charset_normalizer`/`chardet` hooks. Now we specify the pyinstaller steps ourselves and use the newest version available on Python 3.10.
The version that `JackMcKew/pyinstaller-action-windows@main` etc. uses has a [bug](psf/requests#6331) with its `charset_normalizer`/`chardet` hooks. Now we specify the pyinstaller steps ourselves and use the newest version available on Python 3.10.
The version that `JackMcKew/pyinstaller-action-windows@main` etc. uses has a [bug](psf/requests#6331) with its `charset_normalizer`/`chardet` hooks. Now we specify the pyinstaller steps ourselves and use the newest version available on Python 3.10.
The version that `JackMcKew/pyinstaller-action-windows@main` etc. uses has a [bug](psf/requests#6331) with its `charset_normalizer`/`chardet` hooks. Now we specify the pyinstaller steps ourselves and use the newest version available on Python 3.10.
The version that `JackMcKew/pyinstaller-action-windows@main` etc. uses has a [bug](psf/requests#6331) with its `charset_normalizer`/`chardet` hooks. Now we specify the pyinstaller steps ourselves and use the newest version available on Python 3.10.
The version that `JackMcKew/pyinstaller-action-windows@main` etc. uses has a [bug](psf/requests#6331) with its `charset_normalizer`/`chardet` hooks. Now we specify the pyinstaller steps ourselves and use the newest version available on Python 3.10.
Requests is not working in PyInstaller packages because of missing file from
charset_normalizer
module.Expected Result
I'm expecting
requests
to be working within PyInstaller package.Actual Result
Once the package is compile within an executable, the executable fail to start as follow:
Reproduction Steps
test.py:
System Information
The text was updated successfully, but these errors were encountered: