** Summary changed:
- Executing the command gives an error of missing dependency
+ [SRU] Executing the command gives an error of missing dependency
** Description changed:
- After having installed python3-locust, I have this issue :
+ [ Impact ]
- ```
+ locust fails to run and crashes immediately when executed by the user.
+
+ $ locust --help
Traceback (most recent call last):
- File "/home/sebastien/.local/bin/locust", line 5, in <module>
+ File "/usr/bin/locust", line 5, in <module>
from locust.main import main
File "/usr/lib/python3/dist-packages/locust/__init__.py", line 18, in
<module>
from .contrib.fasthttp import FastHttpUser
File "/usr/lib/python3/dist-packages/locust/contrib/fasthttp.py", line 23,
in <module>
from charset_normalizer import detect
+ ModuleNotFoundError: No module named 'charset_normalizer'
+
+ [ Test Plan ]
+
+ install locust.
+
+ As a basic test, execute "locust --help"
+
+ If the package is not fixed,it will fail with the above error.
+ With the fixed package, it will display the help menu.
+
+ As a more complete test:
+
+ excute on a terminal: locust -f
+ /usr/share/doc/python3-locust/examples/fast_http_locust.py
+
+ Open browser, and go to http://127.0.0.1:8089
+ It will display the locust interface.
+ On the interface, click on "NEW" and then "START SWARM" in the new window.
+
+ let it run for few minutes and then click "STOP".
+
+ then click on "CHARTS" tab to see the graph, and "LOGS" tab to see the
+ log
+
+
+ [ Where problems could occur ]
+
+ The code is not changed, it just adds a runtime dependency on
+ python3-charset-normalizer so that locust can run. And, so there should
+ not be any regression to locust due to this change.
+
+ [ Other Info ]
+
+ 1. This was caused by https://bugs.launchpad.net/bugs/1975541 when "requests"
was promoted to main.
+ 2. Debian is not affected by this problem as python3-requests in Debian still
depends on python3-charset-normalizer and so as a result "locust" works in
Debian.
+ 3. The oracular fix also adds python3-charset-normalizer to build-dependency
to fix the tests. In the previous build log at
https://launchpadlibrarian.net/721479475/buildlog_ubuntu-noble-amd64.locust_2.24.0-1_BUILDING.txt.gz,
it can be seen that all the tests fail because it could not find
"charset_normalizer".
+ In this SRU "python3-charset-normalizer" is only added as a runtime
dependency so that the build environment remains unchanged.
+
+ [ Original Bug Description ]
+
+ After having installed python3-locust, I have this issue :
+
+ ```
+ Traceback (most recent call last):
+ File "/home/sebastien/.local/bin/locust", line 5, in <module>
+ from locust.main import main
+ File "/usr/lib/python3/dist-packages/locust/__init__.py", line 18, in
<module>
+ from .contrib.fasthttp import FastHttpUser
+ File "/usr/lib/python3/dist-packages/locust/contrib/fasthttp.py", line 23,
in <module>
+ from charset_normalizer import detect
ModuleNotFoundError: No module named 'charset_normalizer'
```
After installation of python3-charset-normalizer, the executable locust
works perfectly.
I use Ubuntu noble 24.04LTS.
Here are the versions of packages during installation :
15-python3-locust_2.24.0-1_all.deb
python3-charset-normalizer_3.3.2-1_all.deb
Have a nice day.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2068036
Title:
[SRU] Executing the command gives an error of missing dependency
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/locust/+bug/2068036/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs