matthewwithanm / pilkit

Utilities and processors built for, and on top of PIL
BSD 3-Clause "New" or "Revised" License
196 stars 54 forks source link

TypeError in save_image with autoconvert=True on Python 3.2 #7

Closed vstoykov closed 11 years ago

vstoykov commented 11 years ago

The error rised was:

unsupported operand type(s) for +: 'dict_items' and 'dict_items'

In Python 3 dict.items() returns an iterator, not a list. One iterator can not be added to another iterator. Instead of getting items of both dict we can update the dict returned from prepare_image with options and then to options to be equal to updated kwargs.

This will work on Python3 and Python2.

matthewwithanm commented 11 years ago

Thanks!