简体   繁体   English

(Locust_Jmeter) TypeError: get() 接受 2 个位置参数,但给出了 3 个

[英](Locust_Jmeter) TypeError: get() takes 2 positional arguments but 3 were given

response = self.client.get('/public/v1/users/', res_Id)
TypeError: get() takes 2 positional arguments but 3 were given

What is res_Id?什么是 res_Id?

Just remove , res_Id只需删除, res_Id

I came into same issue and found.我遇到了同样的问题并找到了。

You forgot to add 'self' object reference in your get() fun.您忘记在 get() 乐趣中添加“自我”对象引用。

check your get()检查你的 get()

Replace代替

def get(route , res_Id)

to

def get(self, route , res_Id)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 TypeError:get()接受2个位置参数,但给出了3个 - TypeError: get() takes 2 positional arguments but 3 were given TypeError: get_cell_value() 需要 3 个位置 arguments 但给出了 4 个 - TypeError: get_cell_value() takes 3 positional arguments but 4 were given TypeError:create()接受2个位置参数,但给出了4个 - TypeError: create() takes 2 positional arguments but 4 were given 类型错误:randint() 需要 3 个位置参数,但给出了 4 个 - TypeError: randint() takes 3 positional arguments but 4 were given TypeError:deriv()接受2个位置参数,但给出了4个 - TypeError: deriv() takes 2 positional arguments but 4 were given TypeError:init()接受0个位置参数,但给出了5个 - TypeError: init() takes 0 positional arguments but 5 were given TypeError: _() 需要 2 个位置 arguments 但有 4 个被赋予 Databricks - TypeError: _() takes 2 positional arguments but 4 were given Databricks TypeError:publish()接受2个位置参数,但给出了3个 - TypeError: publish() takes 2 positional arguments but 3 were given 类型错误:hook() 需要 2 个位置参数,但给出了 3 个 - TypeError: hook() takes 2 positional arguments but 3 were given TypeError:_transform()需要2个位置参数,但是给出了3个 - TypeError: _transform() takes 2 positional arguments but 3 were given
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM