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
from locust.contrib.fasthttp import FastHttpLocust
from locust import task, TaskSet
class UserBehavior(TaskSet):
@task
def get_results(self):
print("about to run")
self.client.get("/")
class WebsiteUser(FastHttpLocust):
task_set = UserBehavior
min_wait = 0
max_wait = 0
_catch_exceptions = False
host = "https://www.mysite.com"
if __name__ == "__main__":
WebsiteUser().run()
~ python3 simple.py
about to run
about to run
Traceback (most recent call last):
File "./simple.py", line 24, in <module>
WebsiteUser().run()
File "/Users/lafp/git/locust/locust/core.py", line 158, in run
task_set_instance.run()
File "/Users/lafp/git/locust/locust/core.py", line 367, in run
self.execute_next_task()
File "/Users/lafp/git/locust/locust/core.py", line 397, in execute_next_task
self.execute_task(task["callable"], *task["args"], **task["kwargs"])
File "/Users/lafp/git/locust/locust/core.py", line 409, in execute_task
task(self, *args, **kwargs)
File "./simple.py", line 10, in get_results
self.client.get("/")
File "/Users/lafp/git/locust/locust/contrib/fasthttp.py", line 210, in get
return self.request("GET", path, **kwargs)
File "/Users/lafp/git/locust/locust/contrib/fasthttp.py", line 169, in request
response = self._send_request_safe_mode(method, url, payload=data, headers=headers, **kwargs)
File "/Users/lafp/git/locust/locust/contrib/fasthttp.py", line 116, in _send_request_safe_mode
return self.client.urlopen(url, method=method, **kwargs)
File "/usr/local/lib/python3.7/site-packages/geventhttpclient/useragent.py", line 340, in urlopen
self.cookiejar.add_cookie_header(req)
File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/cookiejar.py", line 1356, in add_cookie_header
cookies = self._cookies_for_request(request)
File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/cookiejar.py", line 1282, in _cookies_for_request
cookies.extend(self._cookies_for_domain(domain, request))
File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/cookiejar.py", line 1271, in _cookies_for_domain
if not self._policy.return_ok(cookie, request):
File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/cookiejar.py", line 1093, in return_ok
if not fn(cookie, request):
File "/usr/local/Cellar/python/3.7.5/Frameworks/Python.framework/Versions/3.7/lib/python3.7/http/cookiejar.py", line 1119, in return_ok_secure
if cookie.secure and request.type != "https":
AttributeError: 'CompatRequest' object has no attribute 'type'
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: