-
Notifications
You must be signed in to change notification settings - Fork 135
Closed
Labels
Description
Description of the issue
Trying to froze an application is failing.
Requests is not working in PyInstaller packages because of missing file from charset_normalizer module.
Context information (for bug reports)
- Output of
pyinstaller --version
: 5.7.0 - Version of Python: Any
- Platform: Linux, Windows, Mac
- How you installed Python: n/a
- Did you also try this on another platform? Does it work there?
- try the latest development version, using the following command: Get the same issue.
A minimal example program which shows the error
test.py:
import requests
print(requests.get('http://example.com'))
pip install requests==2.28.2 charset-normalizer==3.0.1 pyinstaller
pyinstaller test.py
dist/test/test
Stacktrace / full error message
Traceback (most recent call last):
File "requests\compat.py", line 11, in <module>
ModuleNotFoundError: No module named 'chardet'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "minarca_client\main.py", line 15, in <module>
from minarca_client.core import (
File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
File "minarca_client\core\__init__.py", line 23, in <module>
import requests
File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
File "requests\__init__.py", line 45, in <module>
File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
File "requests\exceptions.py", line 9, in <module>
File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
File "requests\compat.py", line 13, in <module>
File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
File "charset_normalizer\__init__.py", line 24, in <module>
File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
File "charset_normalizer\api.py", line 5, in <module>
File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
File "charset_normalizer\cd.py", line 9, in <module>
ModuleNotFoundError: No module named 'charset_normalizer.md__mypyc'
Avasamitamarst