Error when click on mailing list: An error occurred while processing your request.
Hey there,
We have a Mailman3 server with quite a few lists all running with no issues. Recently I imported a list from our old Mailman 2 server which went fine.
I attempted to remove the current owner and add myself but now when clicking on the list, Postorius shows: An error occurred while processing your request.
The output of /opt/mailman/web/logs/mailmanweb.log is here:
ERROR 2024-07-09 17:11:33,371 2795 django.request Internal Server Error: /mailman3/lists/net-ops.list.utas.edu.au/ Traceback (most recent call last): File "/opt/mailman/venv/lib64/python3.9/site-packages/django/core/handlers/exception.py", line 56, in inner response = get_response(request) File "/opt/mailman/venv/lib64/python3.9/site-packages/django/core/handlers/base.py", line 197, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/opt/mailman/venv/lib64/python3.9/site-packages/django/views/generic/base.py", line 103, in view return self.dispatch(request, *args, **kwargs) File "/opt/mailman/venv/lib64/python3.9/site-packages/postorius/views/generic.py", line 76, in dispatch return super(MailingListView, self).dispatch(request, *args, **kwargs) File "/opt/mailman/venv/lib64/python3.9/site-packages/django/views/generic/base.py", line 142, in dispatch return handler(request, *args, **kwargs) File "/opt/mailman/venv/lib64/python3.9/site-packages/postorius/views/list.py", line 411, in get return render(request, 'postorius/lists/summary.html', data) File "/opt/mailman/venv/lib64/python3.9/site-packages/django/shortcuts.py", line 24, in render content = loader.render_to_string(template_name, context, request, using=using) File "/opt/mailman/venv/lib64/python3.9/site-packages/django/template/loader.py", line 62, in render_to_string return template.render(context, request) File "/opt/mailman/venv/lib64/python3.9/site-packages/django/template/backends/django.py", line 61, in render return self.template.render(context) File "/opt/mailman/venv/lib64/python3.9/site-packages/django/template/base.py", line 175, in render return self._render(context) File "/opt/mailman/venv/lib64/python3.9/site-packages/django/template/base.py", line 167, in _render return self.nodelist.render(context) File "/opt/mailman/venv/lib64/python3.9/site-packages/django/template/base.py", line 1005, in render return SafeString("".join([node.render_annotated(context) for node in self])) File "/opt/mailman/venv/lib64/python3.9/site-packages/django/template/base.py", line 1005, in <listcomp> return SafeString("".join([node.render_annotated(context) for node in self])) File "/opt/mailman/venv/lib64/python3.9/site-packages/django/template/base.py", line 966, in render_annotated return self.render(context) File "/opt/mailman/venv/lib64/python3.9/site-packages/django/template/loader_tags.py", line 157, in render return compiled_parent._render(context) File "/opt/mailman/venv/lib64/python3.9/site-packages/django/template/base.py", line 167, in _render return self.nodelist.render(context) File "/opt/mailman/venv/lib64/python3.9/site-packages/django/template/base.py", line 1005, in render return SafeString("".join([node.render_annotated(context) for node in self])) File "/opt/mailman/venv/lib64/python3.9/site-packages/django/template/base.py", line 1005, in <listcomp> return SafeString("".join([node.render_annotated(context) for node in self])) File "/opt/mailman/venv/lib64/python3.9/site-packages/django/template/base.py", line 966, in render_annotated return self.render(context) File "/opt/mailman/venv/lib64/python3.9/site-packages/django/template/loader_tags.py", line 63, in render result = block.nodelist.render(context) File "/opt/mailman/venv/lib64/python3.9/site-packages/django/template/base.py", line 1005, in render return SafeString("".join([node.render_annotated(context) for node in self])) File "/opt/mailman/venv/lib64/python3.9/site-packages/django/template/base.py", line 1005, in <listcomp> return SafeString("".join([node.render_annotated(context) for node in self])) File "/opt/mailman/venv/lib64/python3.9/site-packages/django/template/base.py", line 966, in render_annotated return self.render(context) File "/opt/mailman/venv/lib64/python3.9/site-packages/django/template/defaulttags.py", line 321, in render return nodelist.render(context) File "/opt/mailman/venv/lib64/python3.9/site-packages/django/template/base.py", line 1005, in render return SafeString("".join([node.render_annotated(context) for node in self])) File "/opt/mailman/venv/lib64/python3.9/site-packages/django/template/base.py", line 1005, in <listcomp> return SafeString("".join([node.render_annotated(context) for node in self])) File "/opt/mailman/venv/lib64/python3.9/site-packages/django/template/base.py", line 966, in render_annotated return self.render(context) File "/opt/mailman/venv/lib64/python3.9/site-packages/django/template/defaulttags.py", line 52, in render output = self.nodelist.render(context) File "/opt/mailman/venv/lib64/python3.9/site-packages/django/template/base.py", line 1005, in render return SafeString("".join([node.render_annotated(context) for node in self])) TypeError: sequence item 1: expected str instance, NoneType found
I've tried removing it and reimporting it to no avail. Is there anything I can besides manually creating it and adding the members and owners from the old server?
Cheers
On 7/9/24 12:32 AM, adam.heathcote@utas.edu.au wrote:
Hey there,
We have a Mailman3 server with quite a few lists all running with no issues. Recently I imported a list from our old Mailman 2 server which went fine.
I attempted to remove the current owner and add myself but now when clicking on the list, Postorius shows: An error occurred while processing your request.
The output of /opt/mailman/web/logs/mailmanweb.log is here:
ERROR 2024-07-09 17:11:33,371 2795 django.request Internal Server Error: /mailman3/lists/net-ops.list.utas.edu.au/ Traceback (most recent call last): File "/opt/mailman/venv/lib64/python3.9/site-packages/django/core/handlers/exception.py", line 56, in inner response = get_response(request) ... TypeError: sequence item 1: expected str instance, NoneType found
Was there more in the log? I.e., a line like
The above exception was the direct cause of the following exception:
followed by another traceback. If so, what was that?
Is there anything in Mailman core's mailman.log?
I've tried removing it and reimporting it to no avail. Is there anything I can besides manually creating it and adding the members and owners from the old server?
What do you get from Mailman's
mailman members -R owner your_list@your.domain
If this doesn't list you, try something like this:
$ mailman shell -l your_list@your.domain
Welcome to the GNU Mailman shell
Use commit() to commit changes.
Use abort() to discard changes since the last commit.
Exit with ctrl+D does an implicit commit() but exit() does not.
The variable 'm' is the your_list@your.domain mailing list
>>> from mailman.app.membership import add_member
>>> um = getUtility(IUserManager)
>>> usr = um.get_user('adam.heathcote@utas.edu.au')
>>> rr = RequestRecord(usr.preferred_address.email, usr.display_name, None)
>>> add_member(m, rr, MemberRole.owner)
>>> commit()
>>> exit()
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Hi Mark,
Thanks for your help.
There doesn't seem to be anything interesting in the mailman.log apart from the standard GET requests. Here is the full mailmanweb.log after clearing them and restarting the process: https://pastefy.app/7VWxC96g
mailman members -R owner your_list@your.domain
Shows myself as an owner as well as the imported owners from the previous list.
On 7/9/24 6:11 PM, adam.heathcote@utas.edu.au wrote:
mailman members -R owner your_list@your.domain
Shows myself as an owner as well as the imported owners from the previous list.
You originally wrote: "but now when clicking on the list, Postorius
shows: An error occurred while processing your request." I'm guessing
you are clicking the list in the Postorius Mailing Lists
view, i.e.
something like https://example.com/mailman3/ or
https://example.com/mailman3/lists, and you are logged in, and the link
is to https://example.com/mailman3/lists/listname.example.com.
What if you go to that page without being logged in, or logged in as a different user?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Hi Mark,
Sorry about the delay in replying.
You're correct, I am clicking on the list in the Mailing List view.
Navigating to the list URL directly while not logged in produces the same error and even produces the error when a different user is logged in.
On 7/14/24 21:40, adam.heathcote@utas.edu.au wrote:
Hi Mark,
Sorry about the delay in replying.
You're correct, I am clicking on the list in the Mailing List view.
Navigating to the list URL directly while not logged in produces the same error and even produces the error when a different user is logged in.
Now it's my turn to apologize. I've been traveling. In your original post you wrote "I've tried removing it and reimporting it to no avail." What exactly does this mean. You removed the list how? Then you reran the import21. Was the list broken at that point, or only after removing the old owners and adding yourself?
What if you try the following steps in order and try to view the list in Postorius after each step.
remove the list with
mailman remove list@example.com
and recreate it withmailman create list@example.com
run
mailman import21 list@example.com path/to/config.pck
in Postorius, add yourself as owner.
in Postorius, delete one of the other owners.
repeat the deletion and viewing the list for the other unwanted owners one at a time.
If the view throws the error at some point, after which step?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
adam.heathcote@utas.edu.au
-
Mark Sapiro