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.

Windows: Encoding error writing scons report

See original GitHub issue

Hi,

I’m trying to build but it does not work and i cant figure out why…

python -m nuitka --show-scons hello.py

PS C:\Users\Annox\Documents\git\HelloWorld> python -m nuitka --show-scons hello.py
Nuitka-Options:INFO: Used command line options: --show-scons hello.py
Nuitka-Options:WARNING: You did not specify to follow or include anything but main program. Check options and make sure that is intended.
Nuitka:INFO: Starting Python compilation with Nuitka '0.7.7' on Python '3.10' commercial None.
Nuitka:INFO: Completed Python level compilation and optimization.
Nuitka:INFO: Generating source code for C backend compiler.
Nuitka:INFO: Running data composer tool for optimal constant value handling.
Nuitka:INFO: Running C compilation via Scons.
Scons command: C:\Users\Annox\AppData\Local\Programs\Python\Python310\python.exe -W ignore C:\Users\Annox\AppData\Local\Programs\Python\PYTHON~1\lib\SITE-P~1\nuitka\build\INLINE~1\bin\scons.py -f C:\Users\Annox\AppData\Local\Programs\Python\PYTHON~1\lib\SITE-P~1\nuitka\build\BACKEN~1.SCO --jobs 8 --warn=no-deprecated --no-site-dir --debug=stacktrace result_name=C:\Users\Annox\DOCUME~1\git\HELLOW~1\hello source_dir=. nuitka_python=false debug_mode=false python_debug=false unstripped_mode=false module_mode=false full_compat=false experimental= trace_mode=false python_version=3.10 target_arch=x86_64 python_prefix=C:\Users\Annox\AppData\Local\Programs\Python\Python310 nuitka_src=C:\Users\Annox\AppData\Local\Programs\Python\PYTHON~1\lib\SITE-P~1\nuitka\build module_count=2 result_exe=C:\Users\Annox\DOCUME~1\git\HELLOW~1\hello.exe uninstalled_python=true noelf_mode=true show_scons=true
scons: Reading SConscript files ...
Nuitka-Scons:INFO: Initial CC: 'cl'
Nuitka-Scons:INFO: Initial CCVERSION: None
Nuitka-Scons:INFO: Checking usability of None from 'cl'
Nuitka-Scons:INFO: No usable C compiler, attempt fallback to winlibs gcc.
Nuitka-Scons:INFO: CC 'C:\\Users\\Annox\\AppData\\Local\\Nuitka\\Nuitka\\gcc\\x86_64\\11.2.0-12.0.1-9.0.0-r1\\mingw64\\bin\\gcc.exe' version check gives (11, 2, 0)
Scons: Compiler used C:\Users\Annox\AppData\Local\Nuitka\Nuitka\gcc\x86_64\11.2.0-12.0.1-9.0.0-r1\mingw64\bin\gcc.exe
Nuitka-Scons:INFO: Backend C compiler: gcc (gcc).
Nuitka-Scons:INFO: LTO mode auto was resolved to mode: 'yes' (known to be supported (new MinGW64)).
Nuitka-Scons:INFO: Using C11 mode: True
Nuitka-Scons:INFO: Using resource mode: 'win_resource' (default for Windows).
Nuitka-Scons:INFO: Told to run compilation on 8 CPUs.
Nuitka-Scons:INFO: Found ccache 'C:\Users\Annox\AppData\Local\Nuitka\Nuitka\gcc\x86_64\11.2.0-12.0.1-9.0.0-r1\mingw64\bin\ccache.exe' to cache C compilation result.
Nuitka-Scons:INFO: Providing real CC path 'C:\Users\Annox\AppData\Local\Nuitka\Nuitka\gcc\x86_64\11.2.0-12.0.1-9.0.0-r1\mingw64\bin\gcc.exe' via PATH extension.
UnicodeEncodeError: 'charmap' codec can't encode character '\u202a' in position 2247: character maps to <undefined>:
  File "C:\Users\Annox\AppData\Local\Programs\Python\PYTHON~1\lib\SITE-P~1\nuitka\build\BACKEN~1.SCO", line 1077:
    writeSconsReport(
  File "C:\Users\Annox\AppData\Local\Programs\Python\Python310\lib\site-packages\nuitka\build\SconsUtils.py", line 308:
    print("PATH=%s" % os.environ["PATH"], file=report_file)
  File "C:\Users\Annox\AppData\Local\Programs\Python\Python310\lib\encodings\cp1252.py", line 19:
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
Maxwell175commented, Apr 11, 2022

It seems you missed the part of the issue template about providing the output of python -m nuitka --version as well as a Short, Self Contained, Correct, Example of the code that causes this issue.

0reactions
kayhayencommented, May 20, 2022

Part of 0.8 release that I just made.

Read more comments on GitHub >

github_iconTop Results From Across the Web

SCons User Guide 2.0.1
This is a simple example of how SCons makes it extremely easy to write portable software builds. (Note that we won't provide duplicate...
Read more >
SCons User's Guide
The most distinctive thing about SCons is that its configuration files are actually scripts, written in the Python programming language.
Read more >
scons-user.pdf
The most distinctive thing about SCons is that its configuration files are actually scripts, written in the Python programming language.
Read more >
SCons 4.4.0
Not Writing a Builder: the Command Builder; 19. ... the first failure, but track the problems found until the end and report on...
Read more >
Manpage of SCONS
On Windows systems, scons searches in order for the Microsoft Visual C++ tools, ... --warn=cache-write-error, --warn=no-cache-write-error: Enables or ...
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