解决python出现unknownencoding:idna的问题这个问题是编码的问题在开头导⼊个包就⾏了,简答粗暴
import encodings.idna
补充:执⾏Python出现LookupError: unknown encoding: cp65001解决办法
在执⾏fetch v8时出现
E:\GitProject\svn_v8>fetch v8
Running: 'E:\GitProject\libcef\depot_tools\python276_' '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>
unknown怎么处理
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
出现此错误后改变编码⽅式即可解决:
chcp 1252
也可以通过修改注册表CodePage值来设置默认字符编码
HKEY_CURRENT_USER\Console\%SystemRoot%_\CodePage
以上为个⼈经验,希望能给⼤家⼀个参考,也希望⼤家多多⽀持。如有错误或未考虑完全的地⽅,望不吝赐教。
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论