Hi again,
On 3/2/21 12:10 AM, David Partain via Mailman-users wrote:
I'm not on the latest mailman, unfortunately. I use the bundled
packages on Ubuntu 18.04, which are
mailman3 3.1.1-9 mailman3-doc 3.1.1-9 mailman3-full 3.1.1-9 mailman3-web 0+20170523-14
From the mailman-web logs, it looks like it's using python2.
That would explain a lot.
I was wrong...
# ps -ef | grep python | grep mailman list 22170 1 0 08:30 ? 00:00:00 /usr/bin/python3 /usr/lib/mailman3/bin/master -C /etc/mailman3/mailman.cfg list 22176 22170 0 08:30 ? 00:00:05 /usr/bin/python3 /usr/lib/mailman3/bin/runner --runner=archive:0:1 -C /etc/mailman3/mailman.cfg list 22177 22170 0 08:30 ? 00:00:05 /usr/bin/python3 /usr/lib/mailman3/bin/runner --runner=bounces:0:1 -C /etc/mailman3/mailman.cfg (etc.)
However, if I look in mailman-web.log, I see lots of logging like:
DataError: (1366, u"Incorrect string value: '\\xF0\\x9F\\x95\\xB5\\xF0\\x9F...' for column 'content' at row 1") ERROR 2021-03-02 08:58:29,407 24297 django.request Internal Server Error: /mailman3/hyperkitty/api/mailman/archive Traceback (most recent call last): File "/usr/lib/python2.7/dist- packages/django/core/handlers/exception.py", line 41, in inner response = get_response(request)
Note that it's pointing to /usr/lib/python2.7/dist- packages/django/core/handlers/exception.py
This could explain all of this behavior... Clearly whoever installed this box included both.
So mailman core seems to be using python3 and mailman-web python2?
I assume this is because /usr/share/mailman3-web/manage.py, which has:
'#!/usr/bin/env python'
resolves to Python 2.7.17.
Should I could try changing that to '#!/usr/bin/env python3' and see what happens? :) I could also uninstall python2 but that becomes more of a nail-biter...
I suggest removing all the .pyc files and restarting the services. That will probably recreate .pyc files, but they should then be good.
Nothing was regenerated yesterday when I removed them, but that could be because of the python2 issue.
Cheers,
David