question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Nuitka failed to detect DLLs that come from PATH elements with non-unicode characters

See original GitHub issue
  1. building

nuitka --standalone --show-memory --show-progress --mingw64 --include-qt-plugins=sensible,styles --enable-plugin=pyside6 --output-dir=dist main.py

  1. environment os: win 10 x64 pip list: (sdpmsc) PS D:\code\sdpmsc> pip list Package Version certifi 2022.5.18.1 charset-normalizer 2.0.12 idna 3.3 Nuitka 0.8.3 ordered-set 4.1.0 pip 22.0.4 PyMySQL 1.0.2 PySide6 6.2.4 requests 2.27.1 setuptools 62.1.0 shiboken6 6.2.4 urllib3 1.26.9 wheel 0.37.1 WARNING: You are using pip version 22.0.4; however, version 22.1.2 is available. You should consider upgrading via the ‘D:\virtual\sdpmsc\Scripts\python.exe -m pip install --upgrade pip’ command. (sdpmsc) PS D:\code\sdpmsc>

  2. error

Nuitka:INFO: Running data composer tool for optimal constant value handling.
Nuitka:INFO: Running C compilation via Scons.
Nuitka-Scons:INFO: Backend C compiler: gcc (gcc).
Nuitka-Scons:INFO: Backend linking program (no progress information available).
Nuitka-Scons:INFO: Running 'C:\\Users\\wx\\AppData\\Local\\Nuitka\\Nuitka\\gcc\\x86_64\\11.2.0-14.0.0-9.0.0-msvcrt-r7\\mingw64\\bin\\gcc.exe -o "D:\\code\\sdpmsc\\dist\\main.dist\\main.exe" -fuse-linker-plugin -flto=16 -fpartial-inlining -freorder-functions -Wl,--exclude-all-symbols -Wl,--out-implib,.\\import.lib -municode -O3 -s -Wl,--enable-auto-import -Wl,--stack,9863168 -static-libgcc @".\\@link_input.txt" -LC:\\developer\\Python310\\libs -lm -lpython310' took 162.04 seconds
Nuitka-Scons:INFO: Compiled 285 C files using ccache.
Nuitka-Scons:INFO: Cached C files (using ccache) with result 'cache hit': 142
Nuitka-Plugins:INFO: data-files: Included data file 'certifi\cacert.pem' due to package data for 'certifi'.
Nuitka-Plugins:INFO: pyside6: Including Qt plugins 'iconengines,imageformats,platforms,styles' below 'PySide6\qt-plugins'.
Nuitka:INFO: Analysing dependencies of 'dist\main.dist\main.exe'.
Detecting used DLLs:   0%|                                                                                                                                                                                                                                                                                           | 0/38Traceback (most recent call last):
  File "D:\virtual\sdpmsc\lib\site-packages\nuitka\__main__.py", line 137, in <module>
    main()
  File "D:\virtual\sdpmsc\lib\site-packages\nuitka\__main__.py", line 123, in main
    MainControl.main()
  File "D:\virtual\sdpmsc\lib\site-packages\nuitka\MainControl.py", line 978, in main
    copyDllsUsed(
  File "D:\virtual\sdpmsc\lib\site-packages\nuitka\freezer\Standalone.py", line 1367, in copyDllsUsed
    used_dlls = _detectUsedDLLs(
  File "D:\virtual\sdpmsc\lib\site-packages\nuitka\freezer\Standalone.py", line 1137, in _detectUsedDLLs
    worker_pool.submit(
  File "D:\virtual\sdpmsc\lib\site-packages\nuitka\utils\ThreadedExecutor.py", line 45, in submit
    self.results.append(function(*args))
  File "D:\virtual\sdpmsc\lib\site-packages\nuitka\freezer\Standalone.py", line 1091, in addDLLInfo
    used_dlls = _detectBinaryDLLs(
  File "D:\virtual\sdpmsc\lib\site-packages\nuitka\freezer\Standalone.py", line 1057, in _detectBinaryDLLs
    return detectBinaryPathDLLsWindowsDependencyWalker(
  File "D:\virtual\sdpmsc\lib\site-packages\nuitka\freezer\Standalone.py", line 1020, in detectBinaryPathDLLsWindowsDependencyWalker
    result = detectDLLsWithDependencyWalker(binary_filename, scan_dirs)
  File "D:\virtual\sdpmsc\lib\site-packages\nuitka\freezer\DependsExe.py", line 185, in detectDLLsWithDependencyWalker
    result = parseDependsExeOutput(output_filename)
  File "D:\virtual\sdpmsc\lib\site-packages\nuitka\freezer\DependsExe.py", line 129, in parseDependsExeOutput
    return _parseDependsExeOutput2(getFileContentByLine(filename, encoding="latin1"))
  File "D:\virtual\sdpmsc\lib\site-packages\nuitka\freezer\DependsExe.py", line 121, in _parseDependsExeOutput2
    assert os.path.isfile(dll_filename), (dll_filename, line)
AssertionError: ('c:\\progra~2\\tencent\\\x04\x04\x04\x04we~1\\dll\\ws2_32.dll', '          [  6] c:\\progra~2\\tencent\\\x04\x04\x04\x04we~1\\dll\\WS2_32.DLL')

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
daaa2019commented, Jun 17, 2022

屏幕截图 2022-06-16 145431

0reactions
kayhayencommented, Sep 25, 2022

This is part of the stable release 1.1 that I just made.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot copy dist folder created with nuitka to any other ...
This results in a rs_main.dist folder in which are many pyd and dll files and also an rs_main.exe. Executing this exe works fine....
Read more >
Diff - platform/external/python/cpython2 - Google Git
`Nuitka <http://www.nuitka.net/>`_ is +an up-and-coming compiler of Python into C++ code, aiming to support the full +Python language.
Read more >
Python in a Nutshell THE DEFINITIVE REFERENCE
This book is aimed at programmers with some previous exposure to Python, as well as experienced programmers coming to Python for the first...
Read more >
top5relatedtags - Stack Exchange Data Explorer
... 'mysql-error-1241', 'installation-path', 'usernametoken', ... 'zend-controller-router', 'webseal', 'null-character', 'ms-wopi', 'dnx50', ...
Read more >
Viewing online file analysis results for 'pcinfo.exe'
Possibly tries to detect the presence of a debugger. details: GetProcessHeap@KERNEL32.dll at ... Unusual Characteristics. Imports suspicious APIs.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found