Node-gyp: Error: Unicode characters in the path

Created on 17 Jun 2020  路  7Comments  路  Source: nodejs/node-gyp

  • Node Version: latest
  • Platform: Windows 10
  • Compiler: visual studio
  • Module: better-sqlite3

I open issue in better-sqlite3, there says me it's problem with gyp and "The relevant error line is
The relevant error line is UnicodeDecodeError: 'ascii' codec can't decode byte 0x9c in position 15: ordinal not in range(128)
"
```

Full error
npm install better-sqlite3

[email protected] install E:\Krzy艣Bot\node_modules\better-sqlite3
prebuild-install || npm run build-release

prebuild-install WARN install No prebuilt binaries found (target=12.16.3 runtime=node arch=x64 libc= platform=win32)

[email protected] build-release E:\Krzy艣Bot\node_modules\better-sqlite3
node-gyp rebuild --release

E:\Krzy艣Bot\node_modules\better-sqlite3>if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\....\node_modules\node-gyp\bin\node-gyp.js" rebuild --release ) else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild --release )
Traceback (most recent call last):
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gypgypgyp_main.py", line 50, in
sys.exit(gyp.script_main())
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gypgyp\pylibgyp__init__.py", line 554, in script_main
return main(sys.argv[1:])
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gypgyp\pylibgyp__init__.py", line 547, in main
return gyp_main(args)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gypgyp\pylibgyp__init__.py", line 532, in gyp_main
generator.GenerateOutput(flat_list, targets, data, params)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gypgyp\pylibgyp\generator\msvs.py", line 2008, in GenerateOutput
msvs_version)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gypgyp\pylibgyp\generator\msvs.py", line 1843, in _CreateProjectObjects
guid = _GetGuidOfProject(proj_path, spec)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gypgyp\pylibgyp\generator\msvs.py", line 910, in _GetGuidOfProject
guid = guid or MSVSNew.MakeGuid(proj_path)
File "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gypgyp\pylibgyp\MSVSNew.py", line 48, in MakeGuid
d = hashlib.md5((str(seed) + str(name)).encode('utf-8')).hexdigest().upper()
UnicodeDecodeError: 'ascii' codec can't decode byte 0x9c in position 15: ordinal not in range(128)
gyp ERR! configure error
gyp ERR! stack Error: gyp failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:351:16)
gyp ERR! stack at ChildProcess.emit (events.js:310:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Windows_NT 10.0.18363
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild" "--release"
gyp ERR! cwd E:\Krzy艣Bot\node_modules\better-sqlite3
gyp ERR! node -v v12.16.3
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build-release: node-gyp rebuild --release
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build-release script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\skiue\AppData\Roaming\npm-cache_logs\2020-06-17T19_17_04_971Z-debug.log
npm WARN rollback Rolling back [email protected] failed (this is probably harmless): EPERM: operation not permitted, lstat 'E:\Krzy艣Bot\node_modules\bl\node_modules'
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] install: prebuild-install || npm run build-release
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\skiue\AppData\Roaming\npm-cache_logs\2020-06-17T19_17_05_309Z-debug.log

Unicode characters in the path

Most helpful comment

Sorry, non-ascii chars in the path are not supported. Try maybe "KrzysiekBot" for the path :)

All 7 comments

Please provide the command you typed and the full error log.

Please provide the command you typed and the full error log.

okay i did it

What does py --version print?

What does py 鈥攙ersion print?

py -version
E:\python.exe: can't open file '脭脟枚version': [Errno 2] No such file or directory

Sorry py [dash dash]version

py --version
Python 3.8.3

Krzy艣Bot is the problem ... Unicode (not ascii) in the path.

Sorry, non-ascii chars in the path are not supported. Try maybe "KrzysiekBot" for the path :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Sentero-esp12 picture Sentero-esp12  路  3Comments

lopezdp picture lopezdp  路  3Comments

swaj picture swaj  路  3Comments

meldsza picture meldsza  路  3Comments

Yamakaky picture Yamakaky  路  3Comments