PIL problems

Fredrik Lundh fredrik at pythonware.com
Sat Jun 24 11:09:12 EDT 2006


defcon8 wrote:

> The error I get is:
> 
> Traceback (most recent call last):
>   File "realautomata.py", line 72, in ?
>     nim.putdata(y)
>   File "C:\Python24\Lib\site-packages\PIL\Image.py", line 1120, in
> putdata
>     self.im.putdata(data, scale, offset)
> TypeError: too many data entries

the error means that you're passing in more items than there are pixels 
in the target image.  adding

     print nim.size, len(y)

before the putdata line should help you figure out what's wrong.

</F>




More information about the Python-list mailing list