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
I tried to upload a file using FastHttpLocust and got an exception
File "c:\python37\lib\site-packages\locust\contrib\fasthttp.py", line 236, in post
return self.request("POST", path, data=data, **kwargs)
File "c:\python37\lib\site-packages\locust\contrib\fasthttp.py", line 178, in request
response = self._send_request_safe_mode(method, url, payload=data, headers=headers, **kwargs)
File "c:\python37\lib\site-packages\locust\contrib\fasthttp.py", line 124, in _send_request_safe_mode
return self.client.urlopen(url, method=method, **kwargs)
File "c:\python37\lib\site-packages\geventhttpclient\useragent.py", line 333, in urlopen
req = self._make_request(url, method=method, headers=headers, payload=payload)
File "c:\python37\lib\site-packages\geventhttpclient\useragent.py", line 285, in _make_request
raise NotImplementedError
NotImplementedError
The geventhttpclient code confirms that this feature is not supported
def _make_request(self, url, method='GET', headers=None, payload=None):
req_headers = self.default_headers.copy()
if headers:
req_headers.update(headers)
if payload:
# Adjust headers depending on payload content
content_type = req_headers.get('content-type', None)
if not content_type and isinstance(payload, dict):
req_headers['content-type'] = "application/x-www-form-urlencoded; charset=utf-8"
payload = urlencode(payload)
elif not content_type and isinstance(payload, text_type):
req_headers['content-type'] = 'text/plain; charset=utf-8'
elif not content_type:
req_headers['content-type'] = 'application/octet-stream'
elif content_type.startswith("multipart/form-data"):
# See restkit for some example implementation
# TODO: Implement it
raise NotImplementedError
return CompatRequest(url, method=method, headers=req_headers, payload=payload)
I expect that feature is supported. If it is not available for the moment, the document should mention it.
OS: Windows 10, Ubuntu 18
Python version: 3.7
Locust version: 0.13.5, 0.14.4
Locust command line that you ran: locust --no-web -c 15 -r 1 --only-summary --host=http://localhost:5000 -f client/upload_loadtests.py
Locust file contents (anonymized if necessary):
The text was updated successfully, but these errors were encountered:
Describe the bug
I tried to upload a file using FastHttpLocust and got an exception
The geventhttpclient code confirms that this feature is not supported
I expect that feature is supported. If it is not available for the moment, the document should mention it.
The text was updated successfully, but these errors were encountered: