解决python 出现unknown encoding: idna 的问题
这个问题是编码的问题在开头导入个包就行了,简答粗暴
importencodings.idna
补充:执行Python出现LookupError:unknownencoding:cp65001解决办法
在执行fetchv8时出现
E:\GitProject\svn_v8>fetchv8
Running:'E:\GitProject\libcef\depot_tools\python276_bin\python.exe''E:\GitProj
ect\libcef\depot_tools\gclient.py'root
Traceback(mostrecentcalllast):
File"E:\GitProject\libcef\depot_tools\\fetch.py",line353,in
sys.exit(main())
File"E:\GitProject\libcef\depot_tools\\fetch.py",line348,inmain
returnrun(options,spec,root)
File"E:\GitProject\libcef\depot_tools\\fetch.py",line342,inrun
returncheckout.init()
File"E:\GitProject\libcef\depot_tools\\fetch.py",line134,ininit
self.run_gclient('config','--spec',self._format_spec())
File"E:\GitProject\libcef\depot_tools\\fetch.py",line76,inrun_gclient
returnself.run(cmd_prefix+cmd,**kwargs)
File"E:\GitProject\libcef\depot_tools\\fetch.py",line63,inrun
print'Running:%s'%(''.join(pipes.quote(x)forxincmd))
LookupError:unknownencoding:cp65001
LookupError:unknownencoding:cp65001
出现此错误后改变编码方式即可解决:
chcp1252
也可以通过修改注册表CodePage值来设置默认字符编码
HKEY_CURRENT_USER\Console\%SystemRoot%_system32_cmd.exe\CodePage
以上为个人经验,希望能给大家一个参考,也希望大家多多支持毛票票。如有错误或未考虑完全的地方,望不吝赐教。
声明:本文内容来源于网络,版权归原作者所有,内容由互联网用户自发贡献自行上传,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任。如果您发现有涉嫌版权的内容,欢迎发送邮件至:czq8825#qq.com(发邮件时,请将#更换为@)进行举报,并提供相关证据,一经查实,本站将立刻删除涉嫌侵权内容。