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

Locust 0.9.0 slave TypeError: __init__() takes exactly 1 argument (2 given) #887

Closed
csgcp opened this issue Sep 17, 2018 · 1 comment
Closed

Comments

@csgcp
Copy link

csgcp commented Sep 17, 2018

Using Locust 0.9.0.
When a locust slave is hatched, there is a TypeError

mbp: locust --host=deleted --slave --master-host=127.0.0.1
[2018-09-17 13:36:12,199] mbp/INFO/locust.main: Starting Locust 0.9.0
[2018-09-17 13:36:31,279] mbp/INFO/locust.runners: Hatching and swarming 1 clients at the rate 1 clients/s...
[2018-09-17 13:36:31,280] mbp/ERROR/stderr: Traceback (most recent call last):
[2018-09-17 13:36:31,281] mbp/ERROR/stderr: File "src/gevent/greenlet.py", line 716, in gevent._greenlet.Greenlet.run
[2018-09-17 13:36:31,281] mbp/ERROR/stderr: File "/Users/deleted/locust/src/locustio/locust/runners.py", line 114, in start_locust
[2018-09-17 13:36:31,281] mbp/ERROR/stderr: locust().run(runner=self)
[2018-09-17 13:36:31,281] mbp/ERROR/stderr: File "/Users/deleted/locust/src/locustio/locust/core.py", line 158, in run
[2018-09-17 13:36:31,282] mbp/ERROR/stderr: task_set_instance = self.task_set(self)
[2018-09-17 13:36:31,282] mbp/ERROR/stderr: TypeError: __init__() takes exactly 1 argument (2 given)
[2018-09-17 13:36:31,283] mbp/ERROR/stderr: 2018-09-17T17:36:31Z
[2018-09-17 13:36:31,283] mbp/ERROR/stderr: 
[2018-09-17 13:36:31,283] mbp/ERROR/stderr: <Greenlet "Greenlet-0" at 0x103d9b470: start_locust(<class 'locustfile.WebsiteUser'>)> failed with TypeError
[2018-09-17 13:36:32,284] mbp/INFO/locust.runners: All locusts hatched: WebsiteUser: 1

The test is then stuck - none of the simulated users perform any tasks.

The master was started as follows.
locust --host=deleted --master

The issue occurs whether using the UI or --no-web options.

The issue does NOT occur when master/slave is NOT used, for example, this produces no errors:
locust --host=deleted --no-web -c 1 -r 1

Environment is Mac OSX HIgh Sierra 10.13.6 with Python 2.7.14 (reference in the the first line of the locust script file is #!/usr/local/opt/python@2/bin/python2.7)

@csgcp
Copy link
Author

csgcp commented Sep 21, 2018

Issue resolved after changes to local environment. Known changes:

  1. Point /usr/local/bin/python to python3
  2. Added print statements to core.py forcing recomplile to new .pyc

@csgcp csgcp closed this as completed Sep 21, 2018
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

1 participant