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 error #25

Open
theluke opened this issue Jul 3, 2023 · 0 comments
Open

Locust error #25

theluke opened this issue Jul 3, 2023 · 0 comments

Comments

@theluke
Copy link

theluke commented Jul 3, 2023

Hi, I am getting this error

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/locust/user/task.py", line 296, in run
    self.execute_next_task()
  File "/usr/local/lib/python3.8/dist-packages/locust/user/task.py", line 321, in execute_next_task
    self.execute_task(self._task_queue.pop(0))
  File "/usr/local/lib/python3.8/dist-packages/locust/user/task.py", line 330, in execute_task
    task(self).run()
  File "/usr/local/lib/python3.8/dist-packages/locust/user/task.py", line 281, in run
    self.on_start()
  File "/root/locustfile.py", line 101, in on_start
    self.login()
  File "/root/locustfile.py", line 118, in login
    self.user.userid = body["token"]
KeyError: 'token'

When running locust with the provided locust file and the following locust.conf parameters:

locustfile = /root/locustfile.py
headless = true
expect-workers = 0
host = http://localhost:30430
users = 10
spawn-rate = 5
run-time = 5m
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