Error while running mailman-web compilemessages
Hello,
I'm in the process of installing a Mailman3 server. I get the following error messages when I run the command 'mailman-web compilemessages'. It was working fine before and noticed this recently. Can someone suggest a solution to solve this issue, please?
*Execution of msgfmt failed: /opt/mailman/venv/lib/python3.8/site-packages/django_extensions/locale/ar/LC_MESSAGES/django.po:25: 'msgstr' is not a valid Python format string, unlike 'msgid'. Reason: The character that terminates the directive number 1 is not a valid conversion specifier./opt/mailman/venv/lib/python3.8/site-packages/django_extensions/locale/ar/LC_MESSAGES/django.po:82: 'msgstr' is not a valid Python format string, unlike 'msgid'. Reason: In the directive number 1, the character ')' is not a valid conversion specifier./opt/mailman/venv/lib/python3.8/site-packages/django_extensions/locale/ar/LC_MESSAGES/django.po:104: 'msgstr' is not a valid Python format string, unlike 'msgid'. Reason: The string ends in the middle of a directive./opt/mailman/venv/lib/python3.8/site-packages/django_extensions/locale/ar/LC_MESSAGES/django.po:109: 'msgstr' is not a valid Python format string, unlike 'msgid'. Reason: The string ends in the middle of a directive.msgfmt: found 4 fatal errors*
Kind regards, Prasanth Nair
Prasanth Nair writes:
I'm in the process of installing a Mailman3 server. I get the following error messages when I run the command 'mailman-web compilemessages'. It was working fine before and noticed this recently. Can someone suggest a solution to solve this issue, please?
*Execution of msgfmt failed: /opt/mailman/venv/lib/python3.8/site-packages/django_extensions/locale/ar/LC_MESSAGES/django.po:25:
This appears to be a Django issue, not Mailman. My guess is that it's a bug in Django's ar (Arabic?) translation, and a "%" sign is supposed to represent itself. In that case it needs to be doubled as "%%".
A second possibility is that you are using a very recent version of Django that requires a very recent version of msgfmt (from gettext-tools), which has extended the conversion operators. In this case, it would help to know
- What version is your Django?
- What version is your msgfmt?
Steve
Hi Steve,
Thank you for the quick response and for the possible causes. I'm using the following versions. Django: 3.0.14 msgfmt: 0.19.8.1
Kind regards, Prasanth
On Wed, 20 Jul 2022 at 14:46, Stephen J. Turnbull < stephenjturnbull@gmail.com> wrote:
Prasanth Nair writes:
I'm in the process of installing a Mailman3 server. I get the following error messages when I run the command 'mailman-web compilemessages'. It was working fine before and noticed this recently. Can someone suggest a solution to solve this issue, please?
*Execution of msgfmt failed:
/opt/mailman/venv/lib/python3.8/site-packages/django_extensions/locale/ar/LC_MESSAGES/django.po:25:
This appears to be a Django issue, not Mailman. My guess is that it's a bug in Django's ar (Arabic?) translation, and a "%" sign is supposed to represent itself. In that case it needs to be doubled as "%%".
A second possibility is that you are using a very recent version of Django that requires a very recent version of msgfmt (from gettext-tools), which has extended the conversion operators. In this case, it would help to know
- What version is your Django?
- What version is your msgfmt?
Steve
Prasanth Nair writes:
Thank you for the quick response and for the possible causes. I'm using the following versions. Django: 3.0.14 msgfmt: 0.19.8.1
The Django and msgfmt versions are not the issue. However, both of those versions are quite out of date. I'm not sure if it matters if you update msgfmt, but the documentation site for Django 3.0 now says "This document is for an insecure version of Django that is no longer supported. Please upgrade to a newer release!"
I found some time to track down the source code, and the ar (Arabic) translation is buggy as far as I can tell. I do not understand how this can possibly have ever worked, the initial version from 2020-06-07 has all the same problems. I am not familiar with the configuration of translations in Django; perhaps you can omit it without messing with the source, and that's why it works for us. If you can't find a way to "unconfigure" it, and you don't need it, I suggest you either delete the ar/LC_MESSAGE/django.po file, or move it somewhere msgfmt can't find it.
If you do need it, you should look for "%", and edit so the "%(variable_name)s" strings are exactly the same in the Arabic (msgstr) lines as they are in the original (msgid) lines. I don't speak Arabic, so I have no idea if those variable references are in the right places to make sense in Arabic. If you are not familiar with BIDI text, be prepared for strange behavior from your editor. That is, if the editor is Unicode-conformant, it's likely that the cursor will move "backwards" through the Arabic and jump over then move forward through the English.
It's bedtime for me now, but I will probably file a bug witht eh django_extensions project in the morning.
Steve
Hi Stephen
On Wed, 20 Jul 2022 at 16:19, Stephen J. Turnbull < stephenjturnbull@gmail.com> wrote:
Prasanth Nair writes:
Thank you for the quick response and for the possible causes. I'm using the following versions. Django: 3.0.14 msgfmt: 0.19.8.1
The Django and msgfmt versions are not the issue. However, both of those versions are quite out of date. I'm not sure if it matters if you update msgfmt, but the documentation site for Django 3.0 now says "This document is for an insecure version of Django that is no longer supported. Please upgrade to a newer release!"
Looking at the packaging for mailman-web and mailman-hyperkitty, the former (https://gitlab.com/mailman/mailman-web) specifies "django >=2.2, !=3.0, <4" and the latter (https://gitlab.com/mailman/mailman-hyperkitty/) doesn't seem to specify a django version requirement. There is a separate Hyperkitty project (https://gitlab.com/mailman/hyperkitty) which has added support for Django 4 but that doesn't seem to be what is installed by following the instructions at https://docs.mailman3.org/en/latest/install/virtualenv.html
Regards
Philip
Philip Colmer writes:
Looking at the packaging for mailman-web and mailman-hyperkitty, the former (https://gitlab.com/mailman/mailman-web) specifies "django >=2.2, !=3.0, <4"
This is the relevant requirement, mailman-web is what actually configures django for use by HyperKitty and Postorius.
and the latter (https://gitlab.com/mailman/mailman-hyperkitty/) doesn't seem to specify a django version requirement.
IIRC, mailman-hyperkitty is the small Python module that enables core to send posts to a hyperkitty. That module has nothing to do with Django.
There is a separate Hyperkitty project (https://gitlab.com/mailman/hyperkitty) which has added support for Django 4 but that doesn't seem to be what is installed by following the instructions at https://docs.mailman3.org/en/latest/install/virtualenv.html
This is all very confused (lots of duplication across several project and multiple documented configurations requiring slightly different lists of projects for installation), and we need to clean it up. We're aware of it, but cleaning up is hard because it means that sources for people's existing installations are going to disappear. Also, mailman/hyperkitty is the actual implementation of HyperKitty, and I don't think Django 4 support is considered anything like stable yet, which is why mailman-web doesn't allow it.
Volunteers to identify duplication and help with deduplication welcome! ;-)
On 7/20/22 06:16, Prasanth Nair wrote:
Hello,
I'm in the process of installing a Mailman3 server. I get the following error messages when I run the command 'mailman-web compilemessages'. It was working fine before and noticed this recently. Can someone suggest a solution to solve this issue, please?
This is a bug in the Arabic localization in django-extensions 3.2.0. See https://github.com/django-extensions/django-extensions/issues/1744
If you aren't concerned about Arabic, just ignore those messages.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Thanks Steve.
On Wed, 20 Jul 2022 at 15:39, Mark Sapiro <mark@msapiro.net> wrote:
On 7/20/22 06:16, Prasanth Nair wrote:
Hello,
I'm in the process of installing a Mailman3 server. I get the following error messages when I run the command 'mailman-web compilemessages'. It was working fine before and noticed this recently. Can someone suggest a solution to solve this issue, please?
This is a bug in the Arabic localization in django-extensions 3.2.0. See https://github.com/django-extensions/django-extensions/issues/1744
If you aren't concerned about Arabic, just ignore those messages.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
participants (4)
-
Mark Sapiro
-
Philip Colmer
-
Prasanth Nair
-
Stephen J. Turnbull