On 3/30/23 07:36, Gregory Edigarov wrote:
I have the same issue now. that's happen when I try to open held messages
This is what I have in my logs:
File "/usr/lib/python3/dist-packages/mailman/rest/post_moderation.py", line 167, in _resource_as_dict assert resource is not None, resource AssertionError: None
What is the full traceback?
that is the default mailman3 debian package.
And your primary support resource should be Debian.
GNU Mailman 3.3.3 (Tom Sawyer)
things were working smoothly for a very long time. it started after disk array disaster. we installed the thing to another server, and restored the database from backups.
I've tried to use this magic:
> The variable 'm' is the odoo_leads@qarea.org mailing list
>>>> from mailman.app.moderator import handle_message
>>>> requestdb = IListRequests(m)
>>>> for req in requestdb.held_requests:
> ... if req.request_type == RequestType.held_message:
> ... if not requestdb.get_request(req.id):
> ... print(f'Bad request id: {req.id}, deleting')
> ... requestdb.delete_request(req.id)
> ...
>>>>
but no success. is there any way to fix this?
I think you're on the right track with the above mailman shell
, but
evidently the issue is different.
You might try
>>> requestdb = IListRequests(m)
>>> for req in requestdb.of_type(RequestType.held_message):
... if not requestdb.get_request(req.id):
... print(f'Bad request id: {req.id}, deleting')
... requestdb.delete_request(req.id)
... else:
... print(f'Held request: {requestdb.get_request(req.id)}
...
>>>
To see what the requests look like.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan