-2
b = Button(root3,text="ADD",command=lambda: update_file(str(ent1.get()),str(ent3.get()),str(ent2.get())))
我有這個錯誤:我想傳遞(輸入)值在python的功能,但我有一些錯誤
File "C:/Users/khaled/PycharmProjects/projectAI/fathy1.py", line 29, in <lambda>
b = Button(root3,text="ADD",fg="white",bg="blue",width=10,command=lambda: update_file(str(ent1.get()),str(ent3.get()),str(ent2.get())))
那麼不使用lambda函數,但去一個非匿名函數呢? – Elmex80s
是別的東西傳遞參數fg =「white」和bg =「blue」。我對這個模塊並不是很熟悉,但是我沒有在你的原始代碼中看到它,並且想知道它來自哪裏。 – Hoopdady
代碼: https://1drv.ms/t/s!Aps2wSUDrkfag2nW-US1LXpZ7r4n –