0

I am not sure what is going on. This thing worked before and now it dosn't.

def generate_unity_texture(self, monKey_data):

    width, height = self.texture_image.size
    eye_position = (int(0.88 * width), int(0.88 * height))
    ImageDraw.floodfill(unity_texture_copy, xy=eye_position , value=monKey_data['eye_color'])

return unity_texture_copy

and I get SystemError: new style getargs format but argument is not a tuple. The problem is in pixel[x, y] = value and it is mentioned that the problamatic line of code is PIL\ImageDraw.py", line 349, in floodfill

This is a tuple. I even tried to replace middle with (int(middle[0]), int(middle[1]) but got the same result. In the documentation xy is:

xy – Seed position (a 2-item coordinate tuple).

Which is exactly what I did.

Any suggestions?

martineau
  • 119,623
  • 25
  • 170
  • 301
Randomizer
  • 475
  • 7
  • 19
  • 1
    'This thing worked before' Before what ? – joaquin Aug 06 '18 at 15:29
  • 1
    Is this your real code? Because it's indented strangely, and your last line has one left parenthesis and two right parentheses. Please provide a [mcve]. – Kevin Aug 06 '18 at 15:29
  • Edited it to my real code. And before means I worked on it a month ago, and now I updated every decency, maybe PILLOW made a weird update that massed this up? – Randomizer Aug 06 '18 at 15:43
  • 1
    The [pillow docs](http://pillow.readthedocs.io/en/5.2.x/reference/ImageDraw.html#PIL.ImageDraw.PIL.ImageDraw.floodfill) have a warning for this method that says "This method is experimental", so maybe it's a bug. Check and make sure you've to the latest version of the library. – martineau Aug 06 '18 at 15:52

0 Answers0