Hi,
I am using Python4Delphi to embed Python in a Delphi program. Versions: Python 2.6.4, Delphi 2009, Windows XP.
The Delphi program crashes with EInvalidOp when importing json. I tracked it to the line
NaN, PosInf, NegInf = float('nan'), float('inf'), float('-inf')
in json.decoder.
Sure enough, the command float('nan') raises an EInvalidOp when run inside Python embedded in the Delphi program. When executed in the command line Python (same installation) it simply returns nan.
Any idea what is the difference between the Python standard startup and that of the embedded one that may result in such an error?