[Django] ERROR (EXTERNAL IP): Internal Server Error: /mailman3/lists/test2.***/settings/message_acceptance MultipleObjectsReturned .. get() returned more than one EmailAddress -- it returned 2!

[Django] ERROR (EXTERNAL IP): Internal Server Error: /mailman3/lists/test2.av-huette.de/settings/message_acceptance Full error stack (redacted) see https://dpaste.com/CEFXPNP67.txt
Internal Server Error: /mailman3/lists/test2.*****/settings/message_acceptance
As far as I remember, I removed every member of that test2 list. I think, my bug report could be of interest to fix a (probably) lurking bug. Everything works here, but last week I had this error

On 8/18/25 12:01 PM, Wikinaut wrote:
[Django] ERROR (EXTERNAL IP): Internal Server Error: /mailman3/lists/test2.av-huette.de/settings/message_acceptance Full error stack (redacted) see https://dpaste.com/CEFXPNP67.txt
Internal Server Error: /mailman3/lists/test2.*****/settings/message_acceptance
As far as I remember, I removed every member of that test2 list. I think, my bug report could be of interest to fix a (probably) lurking bug. Everything works here, but last week I had this error
That error results from having two users with email addresses that differ only in case. This could occur with older versions of Django-allauth. There is a script at https://www.msapiro.net/scripts/UC_fix to fix this and one at https://www.msapiro.net/scripts/Mult_primary to fix a possible side effect of the other.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Mark Sapiro wrote:
https://www.msapiro.net/scripts/UC_fix to fix this and one at https://www.msapiro.net/scripts/Mult_primary to fix a possible side effect of the other.
The same problem appeared today with my mariadb-based installation. @Mark, do you have a mysql version of your scripts?
-- ^m'e

On 9/1/25 08:17, ^m'e via Mailman-users wrote:
The same problem appeared today with my mariadb-based installation. @Mark, do you have a mysql version of your scripts?
I'm not certain as I don't offhand have a way to test, but I think
g/psycopg2/s//pymysql/
(i.e. just replace both occurrences of psycopg2
with pymysql
) will
do it.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Thanks, Mark.
On 2025-09-01 19:40, Mark Sapiro wrote:
On 9/1/25 08:17, ^m'e via Mailman-users wrote:
The same problem appeared today with my mariadb-based installation. @Mark, do you have a mysql version of your scripts?
I'm not certain as I don't offhand have a way to test, but I think
g/psycopg2/s//pymysql/
(i.e. just replace both occurrences of
psycopg2
withpymysql
) will do it.
Yeah, it works!
In my case, no uppercase addresses were found by the UC_fix script, whereas the Mult_primary did spot two accounts, both with 'staff status' in Django admin UI and with the same set of extra addresses. Most probably my fault, as I intended to use both accounts for administrative tasks and played to far with assigning the same sets of addresses, one of which was primary for one account. I guess that was causing the failure, right?
-- ^m'e
Mailman's content filtering has removed the following MIME parts from this message.
Content-Type: application/pgp-keys Name: OpenPGP_0xC366FCF67CDBD9F9.asc

Wikinaut writes:
Full error stack (redacted) see https://dpaste.com/CEFXPNP67.txt
Please don't do this unless you're looking at megabytes or perhaps have forward privacy concerns (but it's better to deal with the latter by sending stuff directly to an interested dev). Pastepot/tinyurl sites eventually delete the data, which doesn't help future users who see similar issues. You can attach the file with an Content-Disposition: attachment and/or Content-Type: application/octet-stream MIME type to keep it out of the eyes of people who don't care to look, or just put it at the very end of the post.
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan
участники (5)
-
^m'e
-
Marco Emilio Poleggi
-
Mark Sapiro
-
Stephen J. Turnbull
-
Wikinaut