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.
The error rised was:
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 fromprepare_image
withoptions
and then tooptions
to be equal to updated kwargs.This will work on Python3 and Python2.