Learn how to use Dash Bio for next-gen sequencing & quality control. 🧬Register for the Oct 27 webinar.

Dash packages loading an error

Hello, I was following the Dash tutorial here: Part 2. Layout | Dash for Python Documentation | Plotly and when I try to run it, I get an error.

I wasn’t getting these errors last week. It only started recently. The errors are pasted below.

Is anyone able to help?


Traceback (most recent call last):
File “/path/analytics_app.py”, line 57, in
File “/path/venv/lib/python3.9/site-packages/dash/dash.py”, line 2033, in run_server
self.server.run(host=host, port=port, debug=debug, **flask_run_options)
File “/path/venv/lib/python3.9/site-packages/flask/app.py”, line 922, in run
run_simple(t.cast(str, host), port, self, **options)
File “/path/venv/lib/python3.9/site-packages/werkzeug/serving.py”, line 907, in run_simple
application = DebuggedApplication(application, use_evalex)
File “/path/venv/lib/python3.9/site-packages/werkzeug/debug/init.py”, line 269, in init
self.secret = gen_salt(20)
File “/path/venv/lib/python3.9/site-packages/werkzeug/security.py”, line 136, in gen_salt
return “”.join(secrets.choice(SALT_CHARS) for _ in range(length))
File “/path/venv/lib/python3.9/site-packages/werkzeug/security.py”, line 136, in
return “”.join(secrets.choice(SALT_CHARS) for _ in range(length))
AttributeError: module ‘secrets’ has no attribute ‘choice’