Python st()接受1个位置参数,但给出了2个

Python st()接受1个位置参数,但给出了2个,python,kivy,kivy-language,Python,Kivy,Kivy Language,未将函数与按钮绑定 当我点击按钮时,窗口关闭 错误 看起来Kivy调用st回调时,按钮实例是唯一的参数,但由于st是类new的方法,“self”参数作为第一个参数隐式传递,使得按钮实例成为第二个参数。尝试将st方法更改为: def st(self, instance): print("vllghh") 看起来Kivy调用st回调时,按钮实例是唯一的参数,但由于st是类new的方法,“self”参数作为第一个参数隐式传递,使得按钮实例成为第二个参数。尝试将st方法更改为

未将函数与按钮绑定 当我点击按钮时,窗口关闭

错误



看起来Kivy调用
st
回调时,按钮实例是唯一的参数,但由于
st
是类
new
的方法,“self”参数作为第一个参数隐式传递,使得按钮实例成为第二个参数。尝试将
st
方法更改为:

    def st(self, instance):
        print("vllghh")

看起来Kivy调用
st
回调时,按钮实例是唯一的参数,但由于
st
是类
new
的方法,“self”参数作为第一个参数隐式传递,使得按钮实例成为第二个参数。尝试将
st
方法更改为:

    def st(self, instance):
        print("vllghh")
    def st(self, instance):
        print("vllghh")