【发布时间】:2017-05-15 03:32:36
【问题描述】:
我有一个 tkinter 按钮,按下时会调用命令“nadirpatch”。当我按下按钮时,我收到以下错误:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/tkinter/__init__.py", line 1699, in __call__
return self.func(*args)
TypeError: nadirpatch() missing 3 required positional arguments: 'photoSphere', 'nadir', and 'photospherePath'
这是我的“nadirpatch”代码:(变量已经定义)
def nadirpatch(photoSphere, nadir, photospherePath):
for photospherePath in photospherePath:
photoSphere = Image.open(photospherePath)
nadir = Image.open(nadirPath)
nadir = nadir.resize((photoSphere.size), resample=0)
photoSphere.paste(nadir, (0, 0), nadir)
photoSphere.save((stitchedPath+"/patchedsphere"+(str(fileNum+1))+".jpeg"), "JPEG")
fileNum +=1
谢谢!
【问题讨论】: