Как исправить ошибку при компиляции в PyInstaller «Can not get binary dependencies for file»?

Скомпилировал файл командой:
pyinstaller --onefile C:\pyexe\savemusic.py
Во время компиляции выдало кучу ошибок, чего до этого не было:
167 INFO: PyInstaller: 3.2
167 INFO: Python: 3.5.1
169 INFO: Platform: Windows-10-10.0.10586-SP0
174 INFO: wrote C:\Anaconda3\Scripts\savemusic.spec
253 INFO: UPX is available.
261 INFO: Extending PYTHONPATH with paths
['C:\\pyexe', 'C:\\Anaconda3\\Scripts']
262 INFO: checking Analysis
263 INFO: Building Analysis because out00-Analysis.toc is non existent
263 INFO: Initializing module dependency graph...
269 INFO: Initializing module graph hooks...
272 INFO: Analyzing base_library.zip ...
6101 INFO: running Analysis out00-Analysis.toc
6391 WARNING: Can not get binary dependencies for file: c:\anaconda3\Library\bin\api-ms-win-crt-locale-l1-1-0.dll
Traceback (most recent call last):
  File "c:\anaconda3\lib\site-packages\PyInstaller\depend\bindepend.py", line 695, in getImports
    return _getImports_pe(pth)
  File "c:\anaconda3\lib\site-packages\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe
    dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
6614 WARNING: Can not get binary dependencies for file: c:\anaconda3\Library\bin\api-ms-win-crt-runtime-l1-1-0.dll
Traceback (most recent call last):
  File "c:\anaconda3\lib\site-packages\PyInstaller\depend\bindepend.py", line 695, in getImports
    return _getImports_pe(pth)
  File "c:\anaconda3\lib\site-packages\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe
    dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
6626 WARNING: Can not get binary dependencies for file: c:\anaconda3\Library\bin\api-ms-win-crt-heap-l1-1-0.dll
Traceback (most recent call last):
  File "c:\anaconda3\lib\site-packages\PyInstaller\depend\bindepend.py", line 695, in getImports
    return _getImports_pe(pth)
  File "c:\anaconda3\lib\site-packages\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe
    dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
6663 WARNING: Can not get binary dependencies for file: c:\anaconda3\Library\bin\api-ms-win-crt-stdio-l1-1-0.dll
Traceback (most recent call last):
  File "c:\anaconda3\lib\site-packages\PyInstaller\depend\bindepend.py", line 695, in getImports
    return _getImports_pe(pth)
  File "c:\anaconda3\lib\site-packages\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe
    dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
6729 WARNING: Can not get binary dependencies for file: c:\anaconda3\Library\bin\api-ms-win-crt-math-l1-1-0.dll
Traceback (most recent call last):
  File "c:\anaconda3\lib\site-packages\PyInstaller\depend\bindepend.py", line 695, in getImports
    return _getImports_pe(pth)
  File "c:\anaconda3\lib\site-packages\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe
    dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
7507 WARNING: Can not get binary dependencies for file: c:\anaconda3\Library\bin\api-ms-win-crt-string-l1-1-0.dll
Traceback (most recent call last):
  File "c:\anaconda3\lib\site-packages\PyInstaller\depend\bindepend.py", line 695, in getImports
    return _getImports_pe(pth)
  File "c:\anaconda3\lib\site-packages\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe
    dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
7538 WARNING: Can not get binary dependencies for file: c:\anaconda3\Library\bin\api-ms-win-crt-convert-l1-1-0.dll
Traceback (most recent call last):
  File "c:\anaconda3\lib\site-packages\PyInstaller\depend\bindepend.py", line 695, in getImports
    return _getImports_pe(pth)
  File "c:\anaconda3\lib\site-packages\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe
    dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
7556 WARNING: Can not get binary dependencies for file: c:\anaconda3\Library\bin\api-ms-win-crt-filesystem-l1-1-0.dll
Traceback (most recent call last):
  File "c:\anaconda3\lib\site-packages\PyInstaller\depend\bindepend.py", line 695, in getImports
    return _getImports_pe(pth)
  File "c:\anaconda3\lib\site-packages\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe
    dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
7566 WARNING: Can not get binary dependencies for file: c:\anaconda3\Library\bin\api-ms-win-crt-environment-l1-1-0.dll
Traceback (most recent call last):
  File "c:\anaconda3\lib\site-packages\PyInstaller\depend\bindepend.py", line 695, in getImports
    return _getImports_pe(pth)
  File "c:\anaconda3\lib\site-packages\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe
    dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
7586 WARNING: Can not get binary dependencies for file: c:\anaconda3\Library\bin\api-ms-win-crt-time-l1-1-0.dll
Traceback (most recent call last):
  File "c:\anaconda3\lib\site-packages\PyInstaller\depend\bindepend.py", line 695, in getImports
    return _getImports_pe(pth)
  File "c:\anaconda3\lib\site-packages\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe
    dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
7599 WARNING: Can not get binary dependencies for file: c:\anaconda3\Library\bin\api-ms-win-crt-process-l1-1-0.dll
Traceback (most recent call last):
  File "c:\anaconda3\lib\site-packages\PyInstaller\depend\bindepend.py", line 695, in getImports
    return _getImports_pe(pth)
  File "c:\anaconda3\lib\site-packages\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe
    dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
7611 WARNING: Can not get binary dependencies for file: c:\anaconda3\Library\bin\api-ms-win-crt-conio-l1-1-0.dll
Traceback (most recent call last):
  File "c:\anaconda3\lib\site-packages\PyInstaller\depend\bindepend.py", line 695, in getImports
    return _getImports_pe(pth)
  File "c:\anaconda3\lib\site-packages\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe
    dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
7620 INFO: Caching module hooks...
7630 INFO: Analyzing C:\pyexe\savemusic.py
11470 INFO: Loading module hooks...
11471 INFO: Loading module hook "hook-requests.py"...
11477 INFO: Loading module hook "hook-xml.py"...
11605 INFO: Loading module hook "hook-pydoc.py"...
11606 INFO: Loading module hook "hook-cryptography.py"...
11613 INFO: Loading module hook "hook-encodings.py"...
11667 INFO: Looking for ctypes DLLs
11706 INFO: Analyzing run-time hooks ...
11735 INFO: Looking for dynamic libraries
13458 WARNING: Can not get binary dependencies for file: c:\anaconda3\Library\bin\api-ms-win-crt-utility-l1-1-0.dll
Traceback (most recent call last):
  File "c:\anaconda3\lib\site-packages\PyInstaller\depend\bindepend.py", line 695, in getImports
    return _getImports_pe(pth)
  File "c:\anaconda3\lib\site-packages\PyInstaller\depend\bindepend.py", line 122, in _getImports_pe
    dll, _ = sym.forwarder.split('.')
TypeError: a bytes-like object is required, not 'str'
15278 INFO: Looking for eggs
15278 INFO: Using Python library c:\anaconda3\python35.dll
15278 INFO: Found binding redirects:
[]
15317 INFO: Warnings written to C:\Anaconda3\Scripts\build\savemusic\warnsavemusic.txt
15363 INFO: checking PYZ
15364 INFO: Building PYZ because out00-PYZ.toc is non existent
15364 INFO: Building PYZ (ZlibArchive) C:\Anaconda3\Scripts\build\savemusic\out00-PYZ.pyz
16891 INFO: checking PKG
16892 INFO: Building PKG because out00-PKG.toc is non existent
16892 INFO: Building PKG (CArchive) out00-PKG.pkg
16917 INFO: Executing - upx --lzma -q C:\Users\Соловьев Данил\AppData\Roaming\pyinstaller\bincache01_py35_32bit\api-ms-win-crt-math-l1-1-0.dll
upx: C:\Users\╤юыют№хт ─рэшы\AppData\Roaming\pyinstaller\bincache01_py35_32bit\api-ms-win-crt-math-l1-1-0.dll: NotCompressibleException
17609 INFO: Bootloader c:\anaconda3\lib\site-packages\PyInstaller\bootloader\Windows-32bit\run.exe
17610 INFO: checking EXE
17610 INFO: Building EXE because out00-EXE.toc is non existent
17611 INFO: Building EXE from out00-EXE.toc
17611 INFO: Appending archive to EXE C:\Anaconda3\Scripts\dist\savemusic.exe

PyInstaller 3.2
Python 3.5.1
Дистрибутив Anaconda, так что pywin32 предустановлен.
Хотя в прошлый раз (до некоторых правок в коде) этот файл отлично компилировался
  • Вопрос задан
  • 1493 просмотра
Пригласить эксперта
Ответы на вопрос 1
@tetafro
Этот косяк уже поправили на гитхабе, но вот сегодня ставил pyinstaller через pip - баг всё ещё там. Закинул руками код из коммита в нужный фалик - всё работает.
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы