New installation, new issue: mailman3 migrate -- no module CommonMark
My Ubuntu 24.04 installation is working great, and I have a list running perfectly. I'm now trying to install mailman3 on an older server, this time runing ubuntu 22.04. I'm following the venv installation instructions again, but suddenly came up with a new error.
I've made it to the "Run database migrations" section I run mailmanweb-migrate and get:
(venv) mailman@mail:~$ mailman-web migrate Traceback (most recent call last): File "/opt/mailman/venv/lib/python3.10/site- packages/django/template/backends/django.py", line 128, 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/postorius/templatetags/markdown.py", line 21, in <module> from readme_renderer import markdown as md_render File "/opt/mailman/venv/lib/python3.10/site- packages/readme_renderer/markdown.py", line 16, in <module> from CommonMark import commonmark ModuleNotFoundError: No module named 'CommonMark'
The above exception was the direct cause of the following exception:
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 87, in main execute_from_command_line(sys.argv) File "/opt/mailman/venv/lib/python3.10/site- packages/django/core/management/__init__.py", line 442, in execute_from_command_line utility.execute() File "/opt/mailman/venv/lib/python3.10/site- packages/django/core/management/__init__.py", line 436, 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 412, in run_from_argv self.execute(*args, **cmd_options) File "/opt/mailman/venv/lib/python3.10/site- packages/django/core/management/base.py", line 458, in execute output = self.handle(*args, **options) File "/opt/mailman/venv/lib/python3.10/site- packages/django/core/management/base.py", line 106, in wrapper res = handle_func(*args, **kwargs) File "/opt/mailman/venv/lib/python3.10/site- packages/django/core/management/commands/migrate.py", line 100, in handle self.check(databases=[database]) File "/opt/mailman/venv/lib/python3.10/site- packages/django/core/management/base.py", line 485, in check all_issues = checks.run_checks( File "/opt/mailman/venv/lib/python3.10/site- packages/django/core/checks/registry.py", line 88, in run_checks new_errors = check(app_configs=app_configs, databases=databases) File "/opt/mailman/venv/lib/python3.10/site- packages/django/core/checks/templates.py", line 60, in check_for_template_tags_with_the_same_name for module_name, module_path in get_template_tag_modules(): File "/opt/mailman/venv/lib/python3.10/site- packages/django/template/backends/django.py", line 105, in get_template_tag_modules for name in get_package_libraries(pkg): File "/opt/mailman/venv/lib/python3.10/site- packages/django/template/backends/django.py", line 130, in get_package_libraries raise InvalidTemplateLibrary( django.template.library.InvalidTemplateLibrary: Invalid template library specified. ImportError raised when trying to load 'postorius.templatetags.markdown': No mod ule named 'CommonMark'
I know nothing about CommonMark.
Since I've suffered the error cascade problem of trying to fix things and just making it worse, I stopped here.
Can I ignore this error, or what can I do to fix it?
Thanks!
billo
On 10/26/24 16:20, Bill Oliver wrote:
(venv) mailman@mail:~$ mailman-web migrate Traceback (most recent call last): File "/opt/mailman/venv/lib/python3.10/site- packages/django/template/backends/django.py", line 128, 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/postorius/templatetags/markdown.py", line 21, in <module> from readme_renderer import markdown as md_render File "/opt/mailman/venv/lib/python3.10/site- packages/readme_renderer/markdown.py", line 16, in <module> from CommonMark import commonmark ModuleNotFoundError: No module named 'CommonMark'
What is your version of readme_renderer? I don't see readme_renderer importing from CommonMark in any recent version.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On 10/27/24 05:13, Bill Oliver wrote:
(venv) mailman@mail:~$ pip freeze | grep readme readme-renderer==17.4
Which is over 6 years old. How did that get installed? Current version is 44.0. There may or may not be an issue with the current version as it imports cmarkgfm which is in the venv of all the MM 3 installations I support, but I don't know how it gets there as even though readme_renderer imports it, it is not listed as required by readme_renderer or anything else.
In any case, in your venv, do
pip install --update readme_renderer cmarkgfm
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On Sun, 2024-10-27 at 10:01 -0700, Mark Sapiro wrote:
On 10/27/24 05:13, Bill Oliver wrote:
(venv) mailman@mail:~$ pip freeze | grep readme readme-renderer==17.4
Which is over 6 years old. Howat did that get installed? Current version is 44.0. There may or may not be an issue with the current version as it imports cmarkgfm which is in the venv of all the MM 3 installations I support, but I don't know how it gets there as even though readme_renderer imports it, it is not listed as required by readme_renderer or anything else.
In any case, in your venv, do
pip install --update readme_renderer cmarkgfm
That did the trick, though I had to use --upgrade instead of --update. Thanks... Now on to the next step.
I don't know about the libraries.
Here's my mailman info. It seems like the right version of python.
(venv) mailman@mail:~$ mailman info GNU Mailman 3.3.10 (Tom Sawyer) Python 3.10.12 (main, Sep 11 2024, 15:47:36) [GCC 11.4.0] config file: /etc/mailman3/mailman.cfg db url: postgresql://mailman:qazASD%401cko@localhost/mailman devmode: DISABLED REST root url: http://localhost:8001/3.1/
REST credentials: restadmin:restpass
Thanks for your help!
billo
On 10/27/24 12:41, Bill Oliver wrote:
On Sun, 2024-10-27 at 10:01 -0700, Mark Sapiro wrote:
In any case, in your venv, do
pip install --update readme_renderer cmarkgfm
That did the trick, though I had to use --upgrade instead of --update. Thanks... Now on to the next step.
My bad. Of course I meant --upgrade.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Bill Oliver
-
Mark Sapiro