Since version 2.7.11, you can no longer pass PIL images. You can just add the filename as a string and it will work again.
I commented on the exact same issue here:
Since version 2.7.11, you can no longer pass PIL images. You can just add the filename as a string and it will work again.
I commented on the exact same issue here: