Open NBAFrigge opened 12 months ago
I face similar issue. Compiling with pyinstaller is working fine (I use hrequests without automated browsing support installed) but when executing I get this error :
Downloading hrequests-cgo library from daijro/hrequests...
Traceback (most recent call last):
File "test.py", line 2, in <module>
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 385, in exec_module
File "hrequests\__init__.py", line 30, in <module>
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 385, in exec_module
File "hrequests\response.py", line 13, in <module>
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "PyInstaller\loader\pyimod02_importers.py", line 385, in exec_module
File "hrequests\cffi.py", line 199, in <module>
File "hrequests\cffi.py", line 154, in __init__
File "hrequests\cffi.py", line 132, in load_library
File "hrequests\cffi.py", line 39, in __init__
File "hrequests\cffi.py", line 67, in check_library
File "hrequests\cffi.py", line 101, in download_library
File "hrequests\cffi.py", line 106, in download_file
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\User1\\AppData\\Local\\Temp\\_MEI68602\\hrequests\\bin\\hrequests-cgo-2.1-windows-4.0-amd64.dll'
[14612] Failed to execute script 'test' due to unhandled exception!
Using hrequersts, after creating an exe from my Python script, I get this error at the exe startup: FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\frige\AppData\Local\Temp\_MEI441402\hrequests\bin\CR_VERSIONS.json'.
The script works fine.
That is the command that auto-py-to-exe run: pyinstaller --noconfirm --onefile --console --hidden-import "discord_webhook" "D:/Dev/Main.py"
Can anybody help me?
I tried to put the hrequest in the hidden-import while using auto-py-to-exe but nothing happened