IronPython "LookupError: unknown encoding: hex"

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

+6
json import ironpython
source share
2 answers

A workaround for this is to manually import the hex codec before attempting to import the damaged dependency:

from encodings import hex_codec 

The problem is that IronPython is being tracked , but so far they claim to be a bug in the Python standard library.

+8
source share

Thanks, sblom. I think that the IronPython team is right in speaking of its mistake in the standard library (or at least the Freeze tool since version 2.7). The problem occurs with frozen programs if from encodings import hex_codec is not explicitly written in the script.

Sorry for the 'necro-post', but this is a problem that I think is relevant, at least with respect to the Freeze tool.

+2
source share

All Articles