Skip to content

[mailman3] Django and non-existent mistune.plugins.extra #1316

Open
@BabyFnord

Description

@BabyFnord

Following the UberLab Mailman 3 guide on a fresh Uberspace 7.13.0, in the section Setting up Django the first compile command

[isabell@stardust ~]$ cd mailman-suite
[isabell@stardust mailman-suite]$ python3.8 manage.py migrate

fails due to a supposedly non-existent mistune.plugins.extra:

Traceback (most recent call last):
  File "/home/lfo/.local/lib/python3.8/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 "/home/lfo/.local/lib/python3.8/site-packages/django/template/backends/django.py", line 121, in get_package_libraries
    module = import_module(entry[1])
  File "/usr/lib64/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 843, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/lfo/.local/lib/python3.8/site-packages/hyperkitty/templatetags/decorate.py", line 4, in <module>
    from hyperkitty.lib.renderer import markdown_renderer, text_renderer
  File "/home/lfo/.local/lib/python3.8/site-packages/hyperkitty/lib/renderer.py", line 6, in <module>
    from mistune.plugins.extra import plugin_url
ModuleNotFoundError: No module named 'mistune.plugins.extra'

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/home/lfo/.local/lib/python3.8/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "/home/lfo/.local/lib/python3.8/site-packages/django/core/management/__init__.py", line 413, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/lfo/.local/lib/python3.8/site-packages/django/core/management/base.py", line 354, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/lfo/.local/lib/python3.8/site-packages/django/core/management/base.py", line 398, in execute
    output = self.handle(*args, **options)
  File "/home/lfo/.local/lib/python3.8/site-packages/django/core/management/base.py", line 89, in wrapped
    res = handle_func(*args, **kwargs)
  File "/home/lfo/.local/lib/python3.8/site-packages/django/core/management/commands/migrate.py", line 75, in handle
    self.check(databases=[database])
  File "/home/lfo/.local/lib/python3.8/site-packages/django/core/management/base.py", line 419, in check
    all_issues = checks.run_checks(
  File "/home/lfo/.local/lib/python3.8/site-packages/django/core/checks/registry.py", line 76, in run_checks
    new_errors = check(app_configs=app_configs, databases=databases)
  File "/home/lfo/.local/lib/python3.8/site-packages/django/contrib/admin/checks.py", line 78, in check_dependencies
    for engine in engines.all():
  File "/home/lfo/.local/lib/python3.8/site-packages/django/template/utils.py", line 90, in all
    return [self[alias] for alias in self]
  File "/home/lfo/.local/lib/python3.8/site-packages/django/template/utils.py", line 90, in <listcomp>
    return [self[alias] for alias in self]
  File "/home/lfo/.local/lib/python3.8/site-packages/django/template/utils.py", line 81, in __getitem__
    engine = engine_cls(params)
  File "/home/lfo/.local/lib/python3.8/site-packages/django/template/backends/django.py", line 25, in __init__
    options['libraries'] = self.get_templatetag_libraries(libraries)
  File "/home/lfo/.local/lib/python3.8/site-packages/django/template/backends/django.py", line 43, in get_templatetag_libraries
    libraries = get_installed_libraries()
  File "/home/lfo/.local/lib/python3.8/site-packages/django/template/backends/django.py", line 108, in get_installed_libraries
    for name in get_package_libraries(pkg):
  File "/home/lfo/.local/lib/python3.8/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': No module named 'mistune.plugins.extra'
[isabell@stardust mailman-suite]$

Hmkay but …
find . -name "mistune*"
renders

./.local/lib/python3.8/site-packages/mistune
./.local/lib/python3.8/site-packages/mistune-3.0.0a3.dist-info

mistune seems to be available, except for mistune.plugins.extra. Is this type of error currently reproducible, is there a fix available, would the manual need to be adapted accordingly?

Thank you for taking care of it …

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working. ✨Goodie for three PRs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions