func() takes 0 positional arguments but 1 was given

函数参数传入问题

问题描述:

![wrapper() takes 0 positional arguments but 1 was given]](https://img-blog.csdnimg.cn/20200512234720553.png)

问题原因:

wrapper() takes 0 positional arguments but 1 was given

函数wrapper()未设置参数变量,但是传入了一个参数

解决方法:

根据函数定义时的参数,传入对应的参数

猜你喜欢

转载自blog.csdn.net/weixin_45609519/article/details/106088145
今日推荐