HyperKitty failure: {"error": "'Thread' instance needs to have a primary key value before this relationship can be used."} (400)
Hello list, using mailman3 as of current gitlab master with db-backend postgresql 14.5, I get the following error whenever a message is handed over to hyperkitty for archiving:
Oct 19 11:43:00 2022 (2164807) HyperKitty failure on https://listserv.foo.bar/archives/api/mailman/archive: {"error": "'Thread' instance needs to have a primary key value before this relationship can be used."} (400) Oct 19 11:43:00 2022 (2164807) Could not archive the message with id <kcEE.5Fsdt1DFSK2fk5foEoTfkw.gCYcK5/j2AE@root> Oct 19 11:43:00 2022 (2164807) archiving failed, re-queuing (mailing-list test-list.foo.bar, message <kcEE.5Fsdt1DFSK2fk5foEoTfkw.gCYcK5/j2AE@root>) Oct 19 11:43:00 2022 (2164807) Exception in the HyperKitty archiver: {"error": "'Thread' instance needs to have a primary key value before this relationship can be used."} Oct 19 11:43:00 2022 (2164807) Traceback (most recent call last): File "/opt/mailman/venv/lib/python3.9/site-packages/mailman_hyperkitty/__init__.py", line 158, in _archive_message url = self._send_message(mlist, msg) File "/opt/mailman/venv/lib/python3.9/site-packages/mailman_hyperkitty/__init__.py", line 228, in _send_message raise ValueError(result.text) ValueError: {"error": "'Thread' instance needs to have a primary key value before this relationship can be used."}
I already re-created the db, but this doesn't solve the issue. Sounds like db-definitions for model "Thread" are incomplete, but I can't identify the underlying db-objects.
Thanks for any input, Armin.
-- Aegaeon technologies GmbH phone: +49.941.8107344 fax: +49.941.8107356
Legal disclaimer: http://aegaeon.de/disclaimer/email_all_int.txt
Armin Schöffmann writes:
Hello list, using mailman3 as of current gitlab master with db-backend postgresql 14.5, I get the following error whenever a message is handed over to hyperkitty for archiving:
I don't see offhand how that can happen, except that I'm pretty sure that message does not come from Mailman code, but rather from the backend database via Django. Maybe one of the other devs will have an idea.
In the meantime:
Are HyperKitty, mailmanclient, django3-mailman, and mailman-web also at gitlab master?
What version of Django is installed?
Regards, Steve
Hi Steve,
Stephen J. Turnbull wrote:
In the meantime: Are HyperKitty, mailmanclient, django3-mailman, and mailman-web also at gitlab master?
yes: mailman 3.3.6b1 mailman-hyperkitty 1.2.1 mailman-web 0.0.6.dev12+gb79b7b5 mailmanclient 3.3.3 Django 4.1.2 django-mailman3 1.3.8 HyperKitty 1.3.5 psycopg2-binary 2.9.4 SQLAlchemy 1.3.24 alembic 1.8.1
What version of Django is installed? 4.1.2
Thanks, Armin.
armin.schoeffmann@aegaeon.de writes:
What version of Django is installed? 4.1.2
If your main priority is to get mailman-web working, I suggest trying a downgrade of Django to 3.2.x. (Probably x=16 is current but any x in double digits should be OK).
We just a couple weeks ago merged patches from a 3rd party to support Django 4. So quite a bit of risk here, I don't think any of the core devs are running Django 4 systems yet, and I know none of the production systems at python.org and mailman3.org do yet.
If you're willing to help us get our code in shape for Django 4, of course we'd love to have a beta tester. :-) But to be honest, I have no idea what's going on with that error, and I don't know if either Abhilash or Mark would either. So it may take a while (or Mark could pop up in 10 minutes and wave his magic wand and all will be well -- that's life in the beta lane ;-).
Steve
OK, quick test - your guess is correct: Django 4.1.x is the culprit. Downgrading to 4.0.8 brought hyperkitty back to life. Support for 4.1 was introduced with commit 0f50cae8 (Merge branch 'django4.1' into 'master'). As I'm not familiar with mailman's dev-conventions - is there a recommended procedure to report the issue?
If you're willing to help us get our code in shape for Django 4, of course we'd love to have a beta tester.
Sure, no problem, I'm still evaluating mailman and it's not a critical service here, (yet).
best regards, Armin.
On 10/19/22 15:52, armin.schoeffmann@aegaeon.de wrote:
OK, quick test - your guess is correct: Django 4.1.x is the culprit. Downgrading to 4.0.8 brought hyperkitty back to life. Support for 4.1 was introduced with commit 0f50cae8 (Merge branch 'django4.1' into 'master'). As I'm not familiar with mailman's dev-conventions - is there a recommended procedure to report the issue?
Open an issue at https://gitlab.com/mailman/hyperkitty/-/issues/new
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
armin.schoeffmann@aegaeon.de writes:
quick test - your guess is correct: Django 4.1.x is the culprit. Downgrading to 4.0.8 brought hyperkitty back to life.
I did not expect that! I really thought you'd have to go to 3.x.
Sure, no problem, I'm still evaluating mailman and it's not a critical service here, (yet).
Thanks! And thanks for the report. Really helps us keep things going.
On 10/19/22 21:03, Stephen J. Turnbull wrote:
armin.schoeffmann@aegaeon.de writes:
quick test - your guess is correct: Django 4.1.x is the culprit. Downgrading to 4.0.8 brought hyperkitty back to life.
I did not expect that! I really thought you'd have to go to 3.x.
It is a 4.1 issue and is now fixed https://gitlab.com/mailman/hyperkitty/-/merge_requests/467
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (4)
-
Armin Schöffmann
-
armin.schoeffmann@aegaeon.de
-
Mark Sapiro
-
Stephen J. Turnbull