IronPython“LookupError:未知编码:十六进制” [英] IronPython "LookupError: unknown encoding: hex"

查看:182
本文介绍了IronPython“LookupError:未知编码:十六进制”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在 IronPython 2.0 中导入simplejson(或依赖于它的东西)时,我得到LookupError:未知编码:hex。如何使这项工作?

When I try to "import simplejson" (or something that depends on it) in IronPython 2.0, I get "LookupError: unknown encoding: hex". How do I make this work?

推荐答案

解决方法是在尝试导入损坏的依赖项之前手动导入十六进制编解码器:

The workaround for this is to import the hex codec manually before attempting to import the broken dependency:

from encodings import hex_codec

问题在于由IronPython跟踪,但到目前为止,他们声称这是标准Python库中的一个错误。

The issue is being tracked by IronPython, but so far, they claim it's a bug in the standard Python library.

这篇关于IronPython“LookupError:未知编码:十六进制”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆