這個(gè)問題是編碼的問題在開頭導(dǎo)入個(gè)包就行了,簡答粗暴
補(bǔ)充:執(zhí)行Python出現(xiàn)LookupError: unknown encoding: cp65001解決辦法
在執(zhí)行fetch v8時(shí)出現(xiàn)
E:\GitProject\svn_v8>fetch v8
Running: 'E:\GitProject\libcef\depot_tools\python276_bin\python.exe' 'E:\GitProj
ect\libcef\depot_tools\gclient.py' root
Traceback (most recent call last):
File "E:\GitProject\libcef\depot_tools\\fetch.py", line 353, in module>
sys.exit(main())
File "E:\GitProject\libcef\depot_tools\\fetch.py", line 348, in main
return run(options, spec, root)
File "E:\GitProject\libcef\depot_tools\\fetch.py", line 342, in run
return checkout.init()
File "E:\GitProject\libcef\depot_tools\\fetch.py", line 134, in init
self.run_gclient('config', '--spec', self._format_spec())
File "E:\GitProject\libcef\depot_tools\\fetch.py", line 76, in run_gclient
return self.run(cmd_prefix + cmd, **kwargs)
File "E:\GitProject\libcef\depot_tools\\fetch.py", line 63, in run
print 'Running: %s' % (' '.join(pipes.quote(x) for x in cmd))
LookupError: unknown encoding: cp65001
LookupError: unknown encoding: cp65001
出現(xiàn)此錯(cuò)誤后改變編碼方式即可解決:
chcp 1252
也可以通過修改注冊表CodePage值來設(shè)置默認(rèn)字符編碼
HKEY_CURRENT_USER\Console\%SystemRoot%_system32_cmd.exe\CodePage
以上為個(gè)人經(jīng)驗(yàn),希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教。
您可能感興趣的文章:- python encode和decode的妙用
- Python中docx2txt庫的使用說明
- python docx的超鏈接網(wǎng)址和鏈接文本操作
- 使用pycallgraph分析python代碼函數(shù)調(diào)用流程以及框架解析
- 使用python模塊plotdigitizer摳取論文圖片中的數(shù)據(jù)實(shí)例詳解
- python flask框架詳解