0
我碰到了这个错误,直到脚本结束。该错误位于此代码的最后一行。'JpegImageFile'对象不可调用
for key, i in xylist.iteritems():
foreground = Image.open(a+str(key)[13:-1]+".jpg")
background = Image.open("newschedule.jpg")
x= xylist.get(key)[0]
y= xylist.get(key)[1]
background.paste(foreground(x,y), foreground)
background.save("newschedule.jpg") #must use variable
错误我收到:
Traceback (most recent call last):
File "C:\Usersschedule\Scripts\Code\Dictionary + Loop 21.py", line 169, in <module>
background.paste(foreground(x,y), foreground)
TypeError: 'JpegImageFile' object is not callable
>>>
可能有人请让我知道如何解决这个问题?我已阅读了一些文档,但无法找到任何关于此的内容。
'foreground'不是功能 - 你不能叫'前台(X,Y)' – furas