realbrowserlocusts icon indicating copy to clipboard operation
realbrowserlocusts copied to clipboard

TypeError: __init__() takes 1 positional argument but 2 were given

Open ImSanjayChintha opened this issue 4 years ago • 1 comments

I am using Locust version 1.3.1. when I ran this demo with this version, I am facing issues with greenlet package. I am not sure what is wrong. I also modified the demo code to match locust latest version. For example,

from locust import Locust to from locust import User

Traceback (most recent call last): File "src\gevent\greenlet.py", line 854, in gevent._gevent_cgreenlet.Greenlet.run File "c:\work\projects\careercompass\flask-testing\env\lib\site-packages\locust\runners.py", line 401, in lambda: super(LocalRunner, self).start(user_count, spawn_rate, wait=wait) File "c:\work\projects\careercompass\flask-testing\env\lib\site-packages\locust\runners.py", line 312, in start self.spawn_users(user_count, spawn_rate=spawn_rate, wait=wait) File "c:\work\projects\careercompass\flask-testing\env\lib\site-packages\locust\runners.py", line 204, in spawn_users spawn() File "c:\work\projects\careercompass\flask-testing\env\lib\site-packages\locust\runners.py", line 197, in spawn new_user = user_class(self.environment) TypeError: init() takes 1 positional argument but 2 were given 2020-10-20T15:45:48Z <Greenlet at 0x2445066b8c0: > failed with TypeError

[2020-10-20 21:15:48,809] System/CRITICAL/locust.runners: Unhandled exception in greenlet: <Greenlet at 0x2445066b8c0: > Traceback (most recent call last): File "src\gevent\greenlet.py", line 854, in gevent._gevent_cgreenlet.Greenlet.run File "c:\work\projects\careercompass\flask-testing\env\lib\site-packages\locust\runners.py", line 401, in lambda: super(LocalRunner, self).start(user_count, spawn_rate, wait=wait) File "c:\work\projects\careercompass\flask-testing\env\lib\site-packages\locust\runners.py", line 312, in start self.spawn_users(user_count, spawn_rate=spawn_rate, wait=wait) File "c:\work\projects\careercompass\flask-testing\env\lib\site-packages\locust\runners.py", line 204, in spawn_users spawn() File "c:\work\projects\careercompass\flask-testing\env\lib\site-packages\locust\runners.py", line 197, in spawn new_user = user_class(self.environment) TypeError: init() takes 1 positional argument but 2 were given

ImSanjayChintha avatar Oct 20 '20 15:10 ImSanjayChintha

@ImSanjayChintha maybe this will help -> https://github.com/nickboucart/realbrowserlocusts/pull/15

IngusSkaistkalns avatar Mar 23 '21 20:03 IngusSkaistkalns