You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A KeyError: 'token' error occurs when I try to run locust load generator.
huangxin@huangxin:~/acme_fitness_demo/traffic-generator$ locust --host=http://10.239.154.176
[2021-10-26 21:38:54,918] huangxin/WARNING/locust.main: System open file limit '1024' is below minimum setting '10000'. It's not high enough for load testing, and the OS didn't allow locust to increase it by itself. See https://github.com/locustio/locust/wiki/Installation#increasing-maximum-number-of-open-files-limit for more info.
[2021-10-26 21:38:54,918] huangxin/INFO/locust.main: Starting web interface at http://0.0.0.0:8089 (accepting connections from all network interfaces)
[2021-10-26 21:38:54,931] huangxin/INFO/locust.main: Starting Locust 2.4.1
[2021-10-26 21:39:02,001] huangxin/INFO/locust.runners: Ramping to 1 users at a rate of 1.00 per second
[2021-10-26 21:39:02,001] huangxin/INFO/locust.runners: All users spawned: {"WebSiteUser": 1} (1 total users)
[2021-10-26 21:39:02,012] huangxin/ERROR/locust.user.task: 'token'
Traceback (most recent call last):
File "/home/huangxin/.local/lib/python3.8/site-packages/locust/user/task.py", line 296, in run
self.execute_next_task()
File "/home/huangxin/.local/lib/python3.8/site-packages/locust/user/task.py", line 321, in execute_next_task
self.execute_task(self._task_queue.pop(0))
File "/home/huangxin/.local/lib/python3.8/site-packages/locust/user/task.py", line 330, in execute_task
task(self).run()
File "/home/huangxin/.local/lib/python3.8/site-packages/locust/user/task.py", line 281, in run
self.on_start()
File "/home/huangxin/acme_fitness_demo/traffic-generator/locustfile.py", line 101, in on_start
self.login()
File "/home/huangxin/acme_fitness_demo/traffic-generator/locustfile.py", line 118, in login
self.user.userid = body["token"]
KeyError: 'token'
And I tried to print the body's data, there is no "token" key in it, only "access_token" and "refresh_token" can be found.
A
KeyError: 'token'
error occurs when I try to run locust load generator.And I tried to print the body's data, there is no "token" key in it, only "access_token" and "refresh_token" can be found.
The text was updated successfully, but these errors were encountered: