File "/opt/mailman/venv/lib/python3.10/site-packages/django/template/utils.py", line 66, in __getitem__ return self._engines[alias]
(venv) mailman@mailman:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04 LTS
Release: 22.04
Codename: jammy
(venv) mailman@mailman:~$ uname -a
Linux mailman 5.15.0-37-generic #39-Ubuntu SMP Wed Jun 1 19:16:45 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
(venv) mailman@mailman:~$ pip list
Package Version
------------------- -----------
aiosmtpd 1.4.2
alembic 1.6.5
arrow 1.2.2
asgiref 3.5.2
atpublic 3.0.1
attrs 21.4.0
authheaders 0.15.1
authres 1.2.0
bleach 5.0.0
blessed 1.19.1
certifi 2022.5.18.1
cffi 1.15.0
charset-normalizer 2.0.12
click 8.1.3
cmarkgfm 0.8.0
cryptography 37.0.2
defusedxml 0.7.1
Django 3.0.14
django-allauth 0.51.0
django-appconf 1.0.5
django-compressor 4.0
django-extensions 3.1.5
django-gravatar2 1.4.4
django-haystack 3.2.1
django-mailman3 1.3.7
django-picklefield 3.0.1
django-q 1.3.9
djangorestframework 3.13.1
dkimpy 1.0.5
dnspython 2.2.1
docutils 0.18.1
falcon 3.1.0
flufl.bounce 4.0
flufl.i18n 4.0
flufl.lock 7.0
gunicorn 20.1.0
HyperKitty 1.3.5
idna 3.3
importlib-resources 5.7.1
lazr.config 2.2.3
lazr.delegates 2.0.4
mailman 3.3.5
mailman-hyperkitty 1.2.0
mailman-web 0.0.5
mailmanclient 3.3.3
Mako 1.2.0
MarkupSafe 2.1.1
mistune 2.0.2
networkx 2.8.3
nose 1.3.7
oauthlib 3.2.0
passlib 1.7.4
pip 22.0.2
postorius 1.3.6
psutil 5.9.1
psycopg2-binary 2.9.1
publicsuffix2 2.20191221
pycparser 2.21
Pygments 2.12.0
PyJWT 2.4.0
python-dateutil 2.8.2
python-editor 1.0.4
python3-openid 3.2.0
pytz 2022.1
rcssmin 1.1.0
readme-renderer 35.0
redis 3.5.3
requests 2.28.0
requests-oauthlib 1.3.1
rjsmin 1.2.0
robot-detection 0.4
setuptools 59.6.0
six 1.16.0
SQLAlchemy 1.3.24
sqlparse 0.4.2
urllib3 1.26.9
uWSGI 2.0.20
wcwidth 0.2.5
webencodings 0.5.1
wheel 0.37.1
Whoosh 2.7.4
zope.component 5.0.1
zope.configuration 4.4.1
zope.event 4.5.0
zope.hookable 5.1.0
zope.i18nmessageid 5.0.1
zope.interface 5.4.0
zope.schema 6.2.0
(venv) mailman@mailman:~$ mailman info
GNU Mailman 3.3.5 (Tom Sawyer)
Python 3.10.4 (main, Apr 2 2022, 09:04:19) [GCC 11.2.0]
config file: /etc/mailman3/mailman.cfg
db url: postgres://mailman:12345678_Aa@localhost/mailman
devmode: DISABLED
REST root url: http://localhost:8001/3.1/
REST credentials: restadmin:restpass
(venv) mailman@mailman:~$ mailman-web migrate
Traceback (most recent call last):
File "/opt/mailman/venv/lib/python3.10/site-packages/django/template/utils.py", line 66, in __getitem__
return self._engines[alias]
KeyError: 'django'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/mailman/venv/lib/python3.10/site-packages/django/template/backends/django.py", line 121, in get_package_libraries
module = import_module(entry[1])
File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/opt/mailman/venv/lib/python3.10/site-packages/hyperkitty/templatetags/decorate.py", line 4, in <module>
from hyperkitty.lib.renderer import markdown_renderer, text_renderer
File "/opt/mailman/venv/lib/python3.10/site-packages/hyperkitty/lib/renderer.py", line 7, in <module>
from mistune.scanner import escape_html, escape_url
ImportError: cannot import name 'escape_html' from 'mistune.scanner' (/opt/mailman/venv/lib/python3.10/site-packages/mistune/scanner.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/mailman/venv/bin/mailman-web", line 8, in <module>
sys.exit(main())
File "/opt/mailman/venv/lib/python3.10/site-packages/mailman_web/manage.py", line 30, in main
execute_from_command_line(sys.argv)
File "/opt/mailman/venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
utility.execute()
File "/opt/mailman/venv/lib/python3.10/site-packages/django/core/management/__init__.py", line 395, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/mailman/venv/lib/python3.10/site-packages/django/core/management/base.py", line 328, in run_from_argv
self.execute(*args, **cmd_options)
File "/opt/mailman/venv/lib/python3.10/site-packages/django/core/management/base.py", line 366, in execute
self.check()
File "/opt/mailman/venv/lib/python3.10/site-packages/django/core/management/base.py", line 392, in check
all_issues = self._run_checks(
File "/opt/mailman/venv/lib/python3.10/site-packages/django/core/management/commands/migrate.py", line 64, in _run_checks
issues.extend(super()._run_checks(**kwargs))
File "/opt/mailman/venv/lib/python3.10/site-packages/django/core/management/base.py", line 382, in _run_checks
return checks.run_checks(**kwargs)
File "/opt/mailman/venv/lib/python3.10/site-packages/django/core/checks/registry.py", line 72, in run_checks
new_errors = check(app_configs=app_configs)
File "/opt/mailman/venv/lib/python3.10/site-packages/django/contrib/admin/checks.py", line 76, in check_dependencies
for engine in engines.all():
File "/opt/mailman/venv/lib/python3.10/site-packages/django/template/utils.py", line 90, in all
return [self[alias] for alias in self]
File "/opt/mailman/venv/lib/python3.10/site-packages/django/template/utils.py", line 90, in <listcomp>
return [self[alias] for alias in self]
File "/opt/mailman/venv/lib/python3.10/site-packages/django/template/utils.py", line 81, in __getitem__
engine = engine_cls(params)
File "/opt/mailman/venv/lib/python3.10/site-packages/django/template/backends/django.py", line 25, in __init__
options['libraries'] = self.get_templatetag_libraries(libraries)
File "/opt/mailman/venv/lib/python3.10/site-packages/django/template/backends/django.py", line 43, in get_templatetag_libraries
libraries = get_installed_libraries()
File "/opt/mailman/venv/lib/python3.10/site-packages/django/template/backends/django.py", line 108, in get_installed_libraries
for name in get_package_libraries(pkg):
File "/opt/mailman/venv/lib/python3.10/site-packages/django/template/backends/django.py", line 123, in get_package_libraries
raise InvalidTemplateLibrary(
django.template.library.InvalidTemplateLibrary: Invalid template library specified. ImportError raised when trying to load 'hyperkitty.templatetags.decorate': cannot import name 'escape_html' from 'mistune.scanner' (/opt/mailman/venv/lib/python3.10/site-packages/mistune/scanner.py)
(venv) mailman@mailman:~$
Edited by Mark Sapiro