Rebuilding a list index fails
Now that I’ve got my instance back up and running on the latest released code, I am trying to rebuild a list index. I am using Xapian via haystack, which worked beautifully before my recent list meltdown.
Error messages below.
rebuild_index fails with the same error.
This is with django version 3.0.12.
I am sure I missed reinstalling something or there’s a version mismatch.
Thoughts?
- Mark
mark@pdc-racing.net | 408-348-2878
——
(venv) mailman@mail:/opt/mailman/mm/bin$ ./django-admin update_index_one_list xxxxxxs@pdc-racing.net Traceback (most recent call last): File "/opt/mailman/mm/venv/bin/django-admin", line 8, in <module> sys.exit(execute_from_command_line()) File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line utility.execute() File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 395, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/core/management/base.py", line 328, in run_from_argv self.execute(*args, **cmd_options) File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/core/management/base.py", line 369, in execute output = self.handle(*args, **options) File "/opt/mailman/mm/venv/lib/python3.8/site-packages/hyperkitty/management/commands/update_index_one_list.py", line 41, in handle update_index(listname=options.get("listname")[0], File "/opt/mailman/mm/venv/lib/python3.8/site-packages/hyperkitty/search_indexes.py", line 117, in update_index update_cmd.update_backend("hyperkitty", "default") File "/opt/mailman/mm/venv/lib/python3.8/site-packages/haystack/management/commands/update_index.py", line 280, in update_backend backend = haystack_connections[using].get_backend() File "/opt/mailman/mm/venv/lib/python3.8/site-packages/haystack/utils/loading.py", line 115, in __getitem__ self.thread_local.connections[key] = load_backend( File "/opt/mailman/mm/venv/lib/python3.8/site-packages/haystack/utils/loading.py", line 61, in load_backend return import_class(full_backend_path) File "/opt/mailman/mm/venv/lib/python3.8/site-packages/haystack/utils/loading.py", line 23, in import_class module_itself = importlib.import_module(module_path) File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1014, in _gcd_import File "<frozen importlib._bootstrap>", line 991, in _find_and_load File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 671, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 783, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/opt/mailman/mm/venv/lib/python3.8/site-packages/xapian_backend.py", line 10, in <module> from django.utils import six ImportError: cannot import name 'six' from 'django.utils' (/opt/mailman/mm/venv/lib/python3.8/site-packages/django/utils/__init__.py)
On 2/17/21 12:59 AM, Mark Dadgar wrote:
File "/opt/mailman/mm/venv/lib/python3.8/site-packages/haystack/management/commands/update_index.py", line 280, in update_backend backend = haystack_connections[using].get_backend() File "/opt/mailman/mm/venv/lib/python3.8/site-packages/haystack/utils/loading.py", line 115, in __getitem__ self.thread_local.connections[key] = load_backend( File "/opt/mailman/mm/venv/lib/python3.8/site-packages/haystack/utils/loading.py", line 61, in load_backend return import_class(full_backend_path) File "/opt/mailman/mm/venv/lib/python3.8/site-packages/haystack/utils/loading.py", line 23, in import_class module_itself = importlib.import_module(module_path) File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1014, in _gcd_import File "<frozen importlib._bootstrap>", line 991, in _find_and_load File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 671, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 783, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed _*File "/opt/mailman/mm/venv/lib/python3.8/site-packages/xapian_backend.py",*_ line 10, in <module> from django.utils import six ImportError: cannot import name 'six' from 'django.utils' (/opt/mailman/mm/venv/lib/python3.8/site-packages/django/utils/__init__.py)
The six error usually comes from an outdated or incompatible Django module. I highlighted the line to look more into.
-- Brian Carpenter Harmonylists.com Emwd.com
On 2/17/21 11:10 AM, Brian Carpenter wrote:
_*File "/opt/mailman/mm/venv/lib/python3.8/site-packages/xapian_backend.py",*_ line 10, in <module>
My highlight did not come through. That is the line that shows you the package that is causing Django to throw a fit.
-- Brian Carpenter Harmonylists.com Emwd.com
On 2/16/21 9:59 PM, Mark Dadgar wrote:
Now that I’ve got my instance back up and running on the latest released code, I am trying to rebuild a list index. I am using Xapian via haystack, which worked beautifully before my recent list meltdown.
Error messages below.
rebuild_index fails with the same error.
This is with django version 3.0.12.
django.utils.six was removed in Django 3.0. See <https://pypi.org/project/django-utils-six/> for a work around replacement. I.e. in your venv do
pip install django-utils-six
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On Feb 17, 2021, at 9:58 AM, Mark Sapiro <mark@msapiro.net> wrote:
On 2/16/21 9:59 PM, Mark Dadgar wrote:
Now that I’ve got my instance back up and running on the latest released code, I am trying to rebuild a list index. I am using Xapian via haystack, which worked beautifully before my recent list meltdown.
Error messages below.
rebuild_index fails with the same error.
This is with django version 3.0.12.
django.utils.six was removed in Django 3.0. See <https://pypi.org/project/django-utils-six/> for a work around replacement. I.e. in your venv do
pip install django-utils-six
OK, that got me a step further. Then I needed to do a “pip install xapian-bindings” and now I am up and running.
I really appreciate the support of this community in general and you in particular, Mark. Thank you.
- Mark
mark@pdc-racing.net | 408-348-2878
On Feb 17, 2021, at 11:06 AM, Mark Dadgar <mark@pdc-racing.net> wrote:
On Feb 17, 2021, at 9:58 AM, Mark Sapiro <mark@msapiro.net> wrote:
On 2/16/21 9:59 PM, Mark Dadgar wrote:
Now that I’ve got my instance back up and running on the latest released code, I am trying to rebuild a list index. I am using Xapian via haystack, which worked beautifully before my recent list meltdown.
Error messages below.
rebuild_index fails with the same error.
This is with django version 3.0.12.
django.utils.six was removed in Django 3.0. See <https://pypi.org/project/django-utils-six/> for a work around replacement. I.e. in your venv do
pip install django-utils-six
OK, that got me a step further. Then I needed to do a “pip install xapian-bindings” and now I am up and running.
One last note on this for the next person who searches the list archives:
I also ran into the “Key too long” error while re-indexing. Applying the patch linked here fixed it:
https://gitlab.com/mailman/hyperkitty/-/issues/322
- Mark
mark@pdc-racing.net | 408-348-2878
participants (3)
-
Brian Carpenter
-
Mark Dadgar
-
Mark Sapiro