[Image-SIG] Information about PythonMagick
Fredrik Lundh
fredrik at pythonware.com
Mon Sep 12 19:31:56 CEST 2005
Don Rozenberg wrote:
> *****************************************************************
> Failure in example: im = ImageMath.eval("float(im + 20)",
> im=im.convert("L"))
> from line #116 of selftest.testimage
> Exception raised:
> Traceback (most recent call last):
> File "./doctest.py", line 499, in _run_examples_inner
> exec compile(source, "<string>", "single") in globs
> File "<string>", line 1, in ?
> File "PIL/ImageMath.py", line 200, in eval
> out =__builtin__.eval(expression, args)
> File "<string>", line 0, in ?
> TypeError: __float__ returned non-float (type instance)
> *****************************************************************
>
> I am running python 2.4.1 on a Knoppix/Debian system. I installed
> python from source. It seems that these failures involve exactly what I
> want to do. I then tried using python 2.3.5 and '57 tests passed.'.
> Is this a known problem in python 2.4.1?
it's not a known problem, but it looks like it's a 2.4[.1]-specific problem,
which only affects the int() and float() operations. this shouldn't be hard
to fix; I'll see if I can come up with a patch.
</F>
More information about the Image-SIG
mailing list