Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
ImSanjayChintha opened this issue Oct 20, 2020 · 1 comment

Comments

@ImSanjayChintha
Copy link

ImSanjayChintha commented Oct 20, 2020

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

@IngusSkaistkalns
Copy link

@ImSanjayChintha maybe this will help -> #15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants