[Python-Dev] "can't unpack IEEE 754 special value on non-IEEE platform"

Michael Hudson mwh at python.net
Mon Jun 12 23:51:49 CEST 2006


Fredrik Lundh <fredrik at pythonware.com> writes:

> I just ran the PIL test suite using the current Python trunk, and the 
> tests for a user-contributed plugin raised an interesting exception:
>
> ValueError: can't unpack IEEE 754 special value on non-IEEE platform
>
> fixing this is easy, but the error is somewhat confusing: since when is 
> a modern Intel CPU not an IEEE platform?

When it doesn't define SIZEOF_DOUBLE or maybe SIZEOF_FLOAT, IIRC.  But
I thought Tim fixed this, so I'm reduced to guessing again.  Some
questions that will help me help you:

* What OS/compiler/etc?
* What is the user plugin doing (i.e. is it C or Python)?
* Any chance of a minimal example (if it's Python code, it'll be
  struct usage, most likely, if C, one of _PyFloat_Unpack{4,8} or
  something that calls one of those)?
* What does [float.__getformat__(f) for f in ('float', 'double')] say?

Cheers,
mwh

-- 
  Just put the user directories on a 486 with deadrat7.1 and turn the
  Octane into the afforementioned beer fridge and keep it in your
  office. The lusers won't notice the difference, except that you're
  more cheery during office hours.              -- Pim van Riezen, asr


More information about the Python-Dev mailing list