On 2022-11-30 16:25, Mark Sapiro wrote:
Jan Eden wrote:
I tried setting permissions on /opt/mailman/fulltext_index to 777 temporarily, but the issue remained (as expected). It occurs in the Whoosh backend of Haystack (whoosh_backend.py, line 132-133):
if self.use_file_storage and not os.path.exists(self.path): os.makedirs(self.path)
where self.path is referenced, which is defined in line 110 (as part of the __init__ function):
def __init__(self, connection_alias, **connection_options): super().__init__(connection_alias, **connection_options) self.setup_complete = False self.use_file_storage = True self.post_limit = getattr(connection_options, "POST_LIMIT", 128 * 1024 * 1024) self.path = connection_options.get("PATH")
Unfortunately, I cannot see where the PATH key for connection_options is defined.
It is defined in the HAYSTACK_CONNECTIONS dictionary in your Django settings.
The dictionary contains the following:
HAYSTACK_CONNECTIONS = { 'default': { 'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine', 'PATH': "fulltext_index", }, }
Changing the PATH value to a full path (/opt/mailman/fulltext_index) and restarting mailman-web generates a different error:
ERROR 2022-11-30 16:38:37,953 1028315 django.request Internal Server Error: /archives/list/testing@lists.eden.one/thread/T6MCILAVQYV5QIOGHJB3JNJ26Z7E2Z35/reattach-suggest Traceback (most recent call last): File "/opt/mailman/venv/lib/python3.10/site-packages/django/core/handlers/exception.py", line 55, in inner response = get_response(request) File "/opt/mailman/venv/lib/python3.10/site-packages/django/core/handlers/base.py", line 197, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/opt/mailman/venv/lib/python3.10/site-packages/hyperkitty/lib/view_helpers.py", line 137, in inner return func(request, *args, **kwargs) File "/opt/mailman/venv/lib/python3.10/site-packages/hyperkitty/views/thread.py", line 454, in reattach_suggest sugg_thread = msg.object.thread AttributeError: 'NoneType' object has no attribute 'thread'
- Jan