ValueError: The ADMINS setting must be a list of 2-tuples.
Greetings,
We're trying to move from an ancient and bad Ubuntu-package based installation of mailman3 to a venv-based do-it-the-right-way installation.
# mailman --version GNU Mailman 3.3.9 (Tom Sawyer)
Things seem much better than past migration attempts. We are, though, seeing tons of errors in uwsgi-error.log that look like this:
Traceback (most recent call last): File "/local/mailman/venv/lib/python3.10/site-packages/django/core/handlers/wsgi.py", line 131, in __call__ response = self.get_response(request) File "/local/mailman/venv/lib/python3.10/site-packages/django/core/handlers/base.py", line 140, in get_response response = self._middleware_chain(request) File "/local/mailman/venv/lib/python3.10/site-packages/django/core/handlers/exception.py", line 58, in inner response = response_for_exception(request, exc) File "/local/mailman/venv/lib/python3.10/site-packages/django/core/handlers/exception.py", line 144, in response_for_exception log_response( File "/local/mailman/venv/lib/python3.10/site-packages/django/utils/log.py", line 241, in log_response getattr(logger, level)( File "/usr/lib/python3.10/logging/__init__.py", line 1506, in error self._log(ERROR, msg, args, **kwargs) File "/usr/lib/python3.10/logging/__init__.py", line 1624, in _log self.handle(record) File "/usr/lib/python3.10/logging/__init__.py", line 1634, in handle self.callHandlers(record) File "/usr/lib/python3.10/logging/__init__.py", line 1696, in callHandlers hdlr.handle(record) File "/usr/lib/python3.10/logging/__init__.py", line 968, in handle self.emit(record) File "/local/mailman/venv/lib/python3.10/site-packages/django/utils/log.py", line 128, in emit self.send_mail(subject, message, fail_silently=True, html_message=html_message) File "/local/mailman/venv/lib/python3.10/site-packages/django/utils/log.py", line 131, in send_mail mail.mail_admins( File "/local/mailman/venv/lib/python3.10/site-packages/django/core/mail/__init__.py", line 124, in mail_admins raise ValueError("The ADMINS setting must be a list of 2-tuples.") ValueError: The ADMINS setting must be a list of 2-tuples.
Our ADMINS setting in /etc/mailman3/settings.py has
ADMINS = ( ('Mailman Suite Admin', 'someone@our.domain', 'someoneelse@our.domain'), )
Can someone point me in a direction to correct this?
Thanks in advance.
David
On 3/20/24 13:23, David Partain via Mailman-users wrote:
raise ValueError("The ADMINS setting must be a list of 2-tuples.")
ValueError: The ADMINS setting must be a list of 2-tuples.
Our ADMINS setting in /etc/mailman3/settings.py has
ADMINS = ( ('Mailman Suite Admin', 'someone@our.domain', 'someoneelse@our.domain'), )
Can someone point me in a direction to correct this?
2-tuples, not triples. E.g.
ADMINS = ( ('Mailman Suite Admin1', 'someone@our.domain'), ('Mailman Suite Admin2', 'someoneelse@our.domain'), )
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Hi Mark,
Helpful, as always. Thank you.
And do I feel silly. That was pretty darned obvious.
In any case, it's fixed.
Cheers,
David
From: Mark Sapiro <mark@msapiro.net> Sent: Thursday, March 21, 2024 01:46 To: mailman-users@mailman3.org <mailman-users@mailman3.org> Subject: [MM3-users] Re: ValueError: The ADMINS setting must be a list of 2-tuples.
On 3/20/24 13:23, David Partain via Mailman-users wrote:
raise ValueError("The ADMINS setting must be a list of 2-tuples.")
ValueError: The ADMINS setting must be a list of 2-tuples.
Our ADMINS setting in /etc/mailman3/settings.py has
ADMINS = ( ('Mailman Suite Admin', 'someone@our.domain', 'someoneelse@our.domain'), )
Can someone point me in a direction to correct this?
2-tuples, not triples. E.g.
ADMINS = ( ('Mailman Suite Admin1', 'someone@our.domain'), ('Mailman Suite Admin2', 'someoneelse@our.domain'), )
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
David Partain via Mailman-users writes:
And do I feel silly.
Please don't. You made a good report with all the information needed to point out a fix, even if it was obvious *in hindsight*.
Of course we appreciate the effort of those who figure it out for themselves and save us a bug report, but a good report and a quick fix for it has a lot of educational value, too.
Steve
Thanks! I can also be happy knowing that the next person who Googles the same error will find an answer, even if my silliness will also live on. I can take that 🙂
David
From: Stephen J. Turnbull <turnbull.stephen.fw@u.tsukuba.ac.jp> Sent: Thursday, March 21, 2024 17:04 To: David Partain <david.partain@ericsson.com> Cc: mailman-users@mailman3.org <mailman-users@mailman3.org> Subject: [MM3-users] Re: ValueError: The ADMINS setting must be a list of 2-tuples.
David Partain via Mailman-users writes:
And do I feel silly.
Please don't. You made a good report with all the information needed to point out a fix, even if it was obvious *in hindsight*.
Of course we appreciate the effort of those who figure it out for themselves and save us a bug report, but a good report and a quick fix for it has a lot of educational value, too.
Steve
From: Stephen J. Turnbull <turnbull.stephen.fw@u.tsukuba.ac.jp> Sent: Thursday, March 21, 2024 17:04 To: David Partain <david.partain@ericsson.com> Cc: mailman-users@mailman3.org <mailman-users@mailman3.org> Subject: [MM3-users] Re: ValueError: The ADMINS setting must be a list of 2-tuples.
David Partain via Mailman-users writes:
And do I feel silly.
Please don't. You made a good report with all the information needed to point out a fix, even if it was obvious *in hindsight*.
Of course we appreciate the effort of those who figure it out for themselves and save us a bug report, but a good report and a quick fix for it has a lot of educational value, too.
Steve
participants (3)
-
David Partain
-
Mark Sapiro
-
Stephen J. Turnbull