Code Monkey home page Code Monkey logo

Comments (4)

miiiiiiig avatar miiiiiiig commented on July 3, 2024 1

hmm, I have the same issue on an appliance running a subset of 2.6.1 (also on 2.4.3).
I is a known fact that these appliances only provide a large subset of python, so I guess it's not an issue pertaining to simplejson.
Having said that, any chance you can tell me which version of simplejson introduced '7FF80000000000007FF0000000000000'.decode('hex') ???
Thanks in advance

from simplejson.

etrepum avatar etrepum commented on July 3, 2024

Something is wrong with your server.

$ python2.6
Python 2.6.7 (r267:88850, Jul 31 2011, 19:30:54)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

'7FF80000000000007FF0000000000000'.decode('hex')
'\x7f\xf8\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\x00\x00\x00\x00\x00'

$ python2.5
Python 2.5.2 (r252:60911, Sep 12 2008, 18:44:03)
[GCC 4.0.1 (Apple Inc. build 5465)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

'7FF80000000000007FF0000000000000'.decode('hex')
'\x7f\xf8\x00\x00\x00\x00\x00\x00\x7f\xf0\x00\x00\x00\x00\x00\x00'

from simplejson.

miiiiiiig avatar miiiiiiig commented on July 3, 2024

Never mind, found out that it was always there.
I guess this should work -- or did I miss something?
_BYTES = ''.join([chr(int(x,16)) for x in ['7F','F8','00','00','00','00','00','00','7F','F0','00','00','00','00','00','00']])

from simplejson.

cesarcruz avatar cesarcruz commented on July 3, 2024

I got the same problem in a subset of 2.4.3, It solves by adding

from encodings import hex_codec

in file simplejson.decoder.py

from simplejson.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.