We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have added the following code to a locustfile.py:
from requests import CookieJar # constant definitions skipped COOKIE = CookieJar() COOKIE.set(COOKIE_KEY, COOKIE_VAL, domain=COOKIE_DOMAIN, path=COOKIE_PAHT)
From the documentation, I expected that I could add this cookie in the request:
@task(1) def isalive(self): """ Simply issue an isalive get request """ self.client.get("/isalive", cookies=COOKIE)
But when I run locust I am getting an ImportError: cannot import CookieJar. This is my environment:
locust
ImportError: cannot import CookieJar
The text was updated successfully, but these errors were encountered:
your import is incorrect.
instead, you can use: from cookielib import CookieJar
from cookielib import CookieJar
note: you can also pass cookies as simple dicts, or let requests handle them automagically.
Sorry, something went wrong.
No branches or pull requests
I have added the following code to a locustfile.py:
From the documentation, I expected that I could add this cookie in the request:
But when I run
locust
I am getting anImportError: cannot import CookieJar
. This is my environment:The text was updated successfully, but these errors were encountered: