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
When I tried the the hello world exemple I thought that Locust would try adding the missing scheme for the host.
What I found was that locust tries to launch the user as fast as posible and just spams the printout.
As you can see it loops as fast as possible. I tried to look after a similar issue but I did not found anything.
Wouldn't that be good to have a better error exit then spam looping when something core like the host is wrong.
[2024-02-01 09:30:54,511] d189d6727fd5/ERROR/locust.user.task: Invalid URL 'localhost/hello': No scheme supplied. Perhaps you meant https://localhost/hello?
Traceback (most recent call last):
File "/home/vscode/.local/lib/python3.11/site-packages/locust/user/task.py", line 342, in run
self.execute_next_task()
File "/home/vscode/.local/lib/python3.11/site-packages/locust/user/task.py", line 375, in execute_next_task
self.execute_task(self._task_queue.pop(0))
File "/home/vscode/.local/lib/python3.11/site-packages/locust/user/task.py", line 492, in execute_task
task(self.user)
File "/workspaces/popins-v3/locustfiles/demo.py", line 8, in hello_world
self.client.get("/hello")
File "/home/vscode/.local/lib/python3.11/site-packages/requests/sessions.py", line 602, in get
return self.request("GET", url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vscode/.local/lib/python3.11/site-packages/locust/clients.py", line 136, in request
response = self._send_request_safe_mode(method, url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vscode/.local/lib/python3.11/site-packages/locust/clients.py", line 181, in _send_request_safe_mode
returnsuper().request(method, url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vscode/.local/lib/python3.11/site-packages/requests/sessions.py", line 575, in request
prep = self.prepare_request(req)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vscode/.local/lib/python3.11/site-packages/requests/sessions.py", line 486, in prepare_request
p.prepare(
File "/home/vscode/.local/lib/python3.11/site-packages/requests/models.py", line 368, in prepare
self.prepare_url(url, params)
File "/home/vscode/.local/lib/python3.11/site-packages/requests/models.py", line 439, in prepare_url
raise MissingSchema(
requests.exceptions.MissingSchema: Invalid URL 'localhost/hello': No scheme supplied. Perhaps you meant https://localhost/hello?
[2024-02-01 09:30:54,512] d189d6727fd5/ERROR/locust.user.task: Invalid URL 'localhost/hello': No scheme supplied. Perhaps you meant https://localhost/hello?
Traceback (most recent call last):
File "/home/vscode/.local/lib/python3.11/site-packages/locust/user/task.py", line 342, in run
self.execute_next_task()
File "/home/vscode/.local/lib/python3.11/site-packages/locust/user/task.py", line 375, in execute_next_task
self.execute_task(self._task_queue.pop(0))
File "/home/vscode/.local/lib/python3.11/site-packages/locust/user/task.py", line 492, in execute_task
task(self.user)
File "/workspaces/popins-v3/locustfiles/demo.py", line 8, in hello_world
self.client.get("/hello")
File "/home/vscode/.local/lib/python3.11/site-packages/requests/sessions.py", line 602, in get
return self.request("GET", url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vscode/.local/lib/python3.11/site-packages/locust/clients.py", line 136, in request
response = self._send_request_safe_mode(method, url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vscode/.local/lib/python3.11/site-packages/locust/clients.py", line 181, in _send_request_safe_mode
returnsuper().request(method, url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vscode/.local/lib/python3.11/site-packages/requests/sessions.py", line 575, in request
prep = self.prepare_request(req)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vscode/.local/lib/python3.11/site-packages/requests/sessions.py", line 486, in prepare_request
p.prepare(
File "/home/vscode/.local/lib/python3.11/site-packages/requests/models.py", line 368, in prepare
self.prepare_url(url, params)
File "/home/vscode/.local/lib/python3.11/site-packages/requests/models.py", line 439, in prepare_url
raise MissingSchema(
requests.exceptions.MissingSchema: Invalid URL 'localhost/hello': No scheme supplied. Perhaps you meant https://localhost/hello?
[2024-02-01 09:30:54,513] d189d6727fd5/ERROR/locust.user.task: Invalid URL 'localhost/hello': No scheme supplied. Perhaps you meant https://localhost/hello?
Traceback (most recent call last):
File "/home/vscode/.local/lib/python3.11/site-packages/locust/user/task.py", line 342, in run
self.execute_next_task()
File "/home/vscode/.local/lib/python3.11/site-packages/locust/user/task.py", line 375, in execute_next_task
self.execute_task(self._task_queue.pop(0))
File "/home/vscode/.local/lib/python3.11/site-packages/locust/user/task.py", line 492, in execute_task
task(self.user)
File "/workspaces/popins-v3/locustfiles/demo.py", line 8, in hello_world
self.client.get("/hello")
File "/home/vscode/.local/lib/python3.11/site-packages/requests/sessions.py", line 602, in get
return self.request("GET", url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vscode/.local/lib/python3.11/site-packages/locust/clients.py", line 136, in request
response = self._send_request_safe_mode(method, url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vscode/.local/lib/python3.11/site-packages/locust/clients.py", line 181, in _send_request_safe_mode
returnsuper().request(method, url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vscode/.local/lib/python3.11/site-packages/requests/sessions.py", line 575, in request
prep = self.prepare_request(req)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vscode/.local/lib/python3.11/site-packages/requests/sessions.py", line 486, in prepare_request
p.prepare(
File "/home/vscode/.local/lib/python3.11/site-packages/requests/models.py", line 368, in prepare
self.prepare_url(url, params)
File "/home/vscode/.local/lib/python3.11/site-packages/requests/models.py", line 439, in prepare_url
raise MissingSchema(
requests.exceptions.MissingSchema: Invalid URL 'localhost/hello': No scheme supplied. Perhaps you meant https://localhost/hello?
[2024-02-01 09:30:54,514] d189d6727fd5/ERROR/locust.user.task: Invalid URL 'localhost/hello': No scheme supplied. Perhaps you meant https://localhost/hello?
Traceback (most recent call last):
File "/home/vscode/.local/lib/python3.11/site-packages/locust/user/task.py", line 342, in run
self.execute_next_task()
File "/home/vscode/.local/lib/python3.11/site-packages/locust/user/task.py", line 375, in execute_next_task
self.execute_task(self._task_queue.pop(0))
File "/home/vscode/.local/lib/python3.11/site-packages/locust/user/task.py", line 492, in execute_task
task(self.user)
File "/workspaces/popins-v3/locustfiles/demo.py", line 8, in hello_world
self.client.get("/hello")
File "/home/vscode/.local/lib/python3.11/site-packages/requests/sessions.py", line 602, in get
return self.request("GET", url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vscode/.local/lib/python3.11/site-packages/locust/clients.py", line 136, in request
response = self._send_request_safe_mode(method, url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vscode/.local/lib/python3.11/site-packages/locust/clients.py", line 181, in _send_request_safe_mode
returnsuper().request(method, url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vscode/.local/lib/python3.11/site-packages/requests/sessions.py", line 575, in request
prep = self.prepare_request(req)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vscode/.local/lib/python3.11/site-packages/requests/sessions.py", line 486, in prepare_request
p.prepare(
File "/home/vscode/.local/lib/python3.11/site-packages/requests/models.py", line 368, in prepare
self.prepare_url(url, params)
File "/home/vscode/.local/lib/python3.11/site-packages/requests/models.py", line 439, in prepare_url
raise MissingSchema(
requests.exceptions.MissingSchema: Invalid URL 'localhost/hello': No scheme supplied. Perhaps you meant https://localhost/hello?
[2024-02-01 09:30:54,515] d189d6727fd5/ERROR/locust.user.task: Invalid URL 'localhost/hello': No scheme supplied. Perhaps you meant https://localhost/hello?
Traceback (most recent call last):
File "/home/vscode/.local/lib/python3.11/site-packages/locust/user/task.py", line 342, in run
self.execute_next_task()
File "/home/vscode/.local/lib/python3.11/site-packages/locust/user/task.py", line 375, in execute_next_task
self.execute_task(self._task_queue.pop(0))
File "/home/vscode/.local/lib/python3.11/site-packages/locust/user/task.py", line 492, in execute_task
task(self.user)
File "/workspaces/popins-v3/locustfiles/demo.py", line 8, in hello_world
self.client.get("/hello")
File "/home/vscode/.local/lib/python3.11/site-packages/requests/sessions.py", line 602, in get
return self.request("GET", url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vscode/.local/lib/python3.11/site-packages/locust/clients.py", line 136, in request
response = self._send_request_safe_mode(method, url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vscode/.local/lib/python3.11/site-packages/locust/clients.py", line 181, in _send_request_safe_mode
returnsuper().request(method, url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vscode/.local/lib/python3.11/site-packages/requests/sessions.py", line 575, in request
prep = self.prepare_request(req)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/vscode/.local/lib/python3.11/site-packages/requests/sessions.py", line 486, in prepare_request
p.prepare(
File "/home/vscode/.local/lib/python3.11/site-packages/requests/models.py", line 368, in prepare
self.prepare_url(url, params)
File "/home/vscode/.local/lib/python3.11/site-packages/requests/models.py", line 439, in prepare_url
raise MissingSchema(
requests.exceptions.MissingSchema: Invalid URL 'localhost/hello': No scheme supplied. Perhaps you meant https://localhost/hello?
This issue was closed because it has been stalled for 10 days with no activity. This does not necessarily mean that the issue is bad, but it most likely means that nobody is willing to take the time to fix it. If you have found Locust useful, then consider contributing a fix yourself!
Prerequisites
Description
When I tried the the hello world exemple I thought that Locust would try adding the missing scheme for the host.
What I found was that locust tries to launch the user as fast as posible and just spams the printout.
As you can see it loops as fast as possible. I tried to look after a similar issue but I did not found anything.
Wouldn't that be good to have a better error exit then spam looping when something core like the host is wrong.
Command line
locust -f demo.py --headless --users 1 --spawn-rate -1 -H localhost
Locustfile contents
Python version
3.11.4
Locust version
2.21.0
Operating system
Debian 11
The text was updated successfully, but these errors were encountered: