Package: python3-locust
Version: 1.4.3-3
Severity: important
I tried locust, but (using the hello_world example) couldn't even start it:
[2022-09-27 14:12:45,863] XXX/INFO/locust.main: Starting web interface at
http://0.0.0.0:8089 (accepting connections from all network interfaces)
Traceback (most recent call last):
File "/bin/locust", line 33, in <module>
sys.exit(load_entry_point('locust==1.4.3', 'console_scripts', 'locust')())
File "/usr/lib/python3/dist-packages/locust/main.py", line 286, in main
web_ui = environment.create_web_ui(
File "/usr/lib/python3/dist-packages/locust/env.py", line 165, in create_web_ui
self.web_ui = WebUI(
File "/usr/lib/python3/dist-packages/locust/web.py", line 102, in __init__
app.jinja_options["extensions"].append("
jinja2.ext.do")
KeyError: 'extensions'
Then I found this when searching for the problem:
"Based on what chfaber shared in this StackOverflow post , the workaround
would be to replace
app.jinja_options['extensions'].append('
jinja2.ext.do') with
app.jinja_env.add_extension('
jinja2.ext.do')
"
I followed the advice and locust started like it should.
So, maybe time for a newer version? :-)
-- System Information:
Debian Release: bookworm/sid
APT prefers unstable
APT policy: (500, 'unstable'), (101, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 5.19.0-1-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_DK.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages python3-locust depends on:
ii python3 3.10.6-1
ii python3-configargparse 1.5.3-1
ii python3-flask 2.0.3-1
ii python3-flask-basicauth 0.2.0-2
ii python3-gevent 21.12.0-1
ii python3-geventhttpclient 1.5.3-1+b2
ii python3-msgpack 1.0.3-1+b1
ii python3-psutil 5.9.0-1+b1
ii python3-requests 2.27.1+dfsg-1
ii python3-werkzeug 2.0.2+dfsg1-3
ii python3-zmq 22.3.0-1+b2
python3-locust recommends no packages.
python3-locust suggests no packages.
-- no debconf information