Okay so I might just be stupid, but when I use the following code:
response = openai.Image.create_variation(image = open("source.png"), n = 4)
It gives an error:
'charmap' codec can't decode byte 0x9d in position 87: character maps to <undefined>
I'm assuming this is to do with open() being mainly for text files and not images. But the documentation says image = open(filename) is the correct way to do it. What am I missing here?