[From nobody Sun Mar 22 20:31:06 2026
Received: (at submit) by bugs.debian.org; 6 Aug 2023 00:21:02 +0000
X-Spam-Checker-Version: SpamAssassin 3.4.6-bugs.debian.org_2005_01_02
 (2021-04-09) on buxtehude.debian.org
X-Spam-Level: 
X-Spam-Status: No, score=-4.7 required=4.0 tests=ATTENDEES_DBSPAM_BODY3,
 ATTENDEES_DBSPAM_BODY6,ATTENDEES_DBSPAM_HEADER6,BAYES_00,DKIM_INVALID,
 DKIM_SIGNED,FOURLA,FVGT_m_MULTI_ODD,HAS_PACKAGE,NUMEMAIL,SPF_HELO_NONE,
 SPF_PASS autolearn=ham autolearn_force=no
 version=3.4.6-bugs.debian.org_2005_01_02
X-Spam-Bayes: score:0.0000 Tokens: new, 45; hammy, 150; neutral, 282; spammy,
 0. spammytokens: hammytokens:0.000-+--python3, 0.000-+--deb11u1, 
 0.000-+--sk:oldstab, 0.000-+--H*M:dodds, 0.000-+--apparmor
Return-path: &lt;vorlon@dodds.net&gt;
Received: from norad.dodds.net ([198.145.64.134]:50304)
 by buxtehude.debian.org with esmtps
 (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)
 (Exim 4.94.2) (envelope-from &lt;vorlon@dodds.net&gt;) id 1qSRW0-00BlOZ-H7
 for submit@bugs.debian.org; Sun, 06 Aug 2023 00:21:02 +0000
Received: by norad.dodds.net (Postfix, from userid 504)
 id 36A0CB2800; Sat,  5 Aug 2023 19:10:59 -0500 (CDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=dodds.net; s=mailhub;
 t=1691280659; bh=q9+cz0TJyXLFqg5hFXoeieLouGQgxVs0ISxGFROQMcA=;
 h=Date:From:To:Subject:From;
 b=OyZPXzjzRXm6F6vUoLyE0D4shAE2cxW5n87fiQdZZRzfhXzJaWmH/Kx4AbU1KsU4J
 BIkiQyppW6bjTodMeBJtBo7jq41AkXqkE5+Dpmt5MN6ukYyh09He2Wfj4M5xV/lte/
 yNUgwD25XVZclbD13KCC0z67THk4j3WLrNMJa/OyMvkWXinmHlz0OoMQQVNfVHCQ50
 lWZkr31UkcW01nB3suaLhoqGXEmqk9ADx6msdkXeU8f0gXvD8o2nfvUMmc8Y5cnqWW
 IKy/19ShY5S3DBdrJk5JBtqEZOnX/90GUsmxSxJNhBo5kYYYNEd2NRKE/5zJxQ17mT
 JCOWYAYPGTKaQ==
Date: Sat, 5 Aug 2023 19:10:58 -0500
From: Steve Langasek &lt;vorlon@dodds.net&gt;
To: Debian Bug Tracking System &lt;submit@bugs.debian.org&gt;
Subject: python3-django-hyperkitty: tracebacks with update_index_one_list on
 mailman2 migration
Message-ID: &lt;ZM7lEgxtS255SOnY@dodds.net&gt;
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
X-Reportbug-Version: 7.10.3+deb11u1
X-Greylist: delayed 599 seconds by postgrey-1.36 at buxtehude;
 Sun, 06 Aug 2023 00:21:00 UTC
Delivered-To: submit@bugs.debian.org

Package: python3-django-hyperkitty
Version: 1.3.4-4
Severity: important

Dear Maintainer,

Having just upgraded a system to bullseye, I am in the process of migrating
my mailing lists from the obsolete mailman 2 to mailman3.  Following guides
such as https://docs.mailman3.org/en/latest/migration.html leads me to run,
as list:

$ django-admin hyperkitty_import --settings mailman-web \
    --pythonpath /var/lib/mailman3/hyperkitty/ -l $list_email $mbox_path
$

which succeeds (/var/lib/mailman3/hyperkitty/mailman-web.py is a forked copy
of /etc/mailman3/mailman-web.py with appropriate permissions).

I am then supposed to run update_index_one_list, which fails with a 
confusing error about missing templates:

$ django-admin update_index_one_list --settings mailman-web \
    --pythonpath /var/lib/mailman3/hyperkitty/ -l $list_email
Indexing 421 emails
[ERROR/MainProcess] Failed indexing 1 - 421 (retry 5/5): search/indexes/hyperkitty/email_text.txt (pid 6818): search/indexes/hyperkitty/email_text.txt
Traceback (most recent call last):
  File &quot;/usr/lib/python3/dist-packages/haystack/management/commands/update_index.py&quot;, line 111, in do_update
    backend.update(index, current_qs, commit=commit)
  File &quot;/usr/lib/python3/dist-packages/haystack/backends/whoosh_backend.py&quot;, line 269, in update
    doc = index.full_prepare(obj)
  File &quot;/usr/lib/python3/dist-packages/haystack/indexes.py&quot;, line 236, in full_prepare
    self.prepared_data = self.prepare(obj)
  File &quot;/usr/lib/python3/dist-packages/haystack/indexes.py&quot;, line 227, in prepare 
    self.prepared_data[field.index_fieldname] = field.prepare(obj)
  File &quot;/usr/lib/python3/dist-packages/haystack/fields.py&quot;, line 235, in prepare
    return self.convert(super(CharField, self).prepare(obj))
  File &quot;/usr/lib/python3/dist-packages/haystack/fields.py&quot;, line 99, in prepare
    return self.prepare_template(obj)
  File &quot;/usr/lib/python3/dist-packages/haystack/fields.py&quot;, line 212, in prepare_template
    t = loader.select_template(template_names)
  File &quot;/usr/lib/python3/dist-packages/django/template/loader.py&quot;, line 47, in select_template
    raise TemplateDoesNotExist(', '.join(template_name_list), chain=chain)
django.template.exceptions.TemplateDoesNotExist: search/indexes/hyperkitty/email_text.txt
Traceback (most recent call last):
  File &quot;/usr/bin/django-admin&quot;, line 5, in &lt;module&gt;
    management.execute_from_command_line()
  File &quot;/usr/lib/python3/dist-packages/django/core/management/__init__.py&quot;, line 381, in execute_from_command_line
    utility.execute()
  File &quot;/usr/lib/python3/dist-packages/django/core/management/__init__.py&quot;, line 375, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File &quot;/usr/lib/python3/dist-packages/django/core/management/base.py&quot;, line 323, in run_from_argv
    self.execute(*args, **cmd_options)
  File &quot;/usr/lib/python3/dist-packages/django/core/management/base.py&quot;, line 364, in execute
    output = self.handle(*args, **options)
  File &quot;/usr/lib/python3/dist-packages/hyperkitty/management/commands/update_index_one_list.py&quot;, line 41, in handle
    update_index(listname=options.get(&quot;listname&quot;)[0],
  File &quot;/usr/lib/python3/dist-packages/hyperkitty/search_indexes.py&quot;, line 117, in update_index
    update_cmd.update_backend(&quot;hyperkitty&quot;, &quot;default&quot;)
  File &quot;/usr/lib/python3/dist-packages/haystack/management/commands/update_index.py&quot;, line 319, in update_backend
    max_pk = do_update(
  File &quot;/usr/lib/python3/dist-packages/haystack/management/commands/update_index.py&quot;, line 111, in do_update
    backend.update(index, current_qs, commit=commit)
  File &quot;/usr/lib/python3/dist-packages/haystack/backends/whoosh_backend.py&quot;, line 269, in update
    doc = index.full_prepare(obj)
  File &quot;/usr/lib/python3/dist-packages/haystack/indexes.py&quot;, line 236, in full_prepare
    self.prepared_data = self.prepare(obj)
  File &quot;/usr/lib/python3/dist-packages/haystack/indexes.py&quot;, line 227, in prepare   
    self.prepared_data[field.index_fieldname] = field.prepare(obj)
  File &quot;/usr/lib/python3/dist-packages/haystack/fields.py&quot;, line 235, in prepare
    return self.convert(super(CharField, self).prepare(obj))
  File &quot;/usr/lib/python3/dist-packages/haystack/fields.py&quot;, line 99, in prepare
    return self.prepare_template(obj)
  File &quot;/usr/lib/python3/dist-packages/haystack/fields.py&quot;, line 212, in prepare_template
    t = loader.select_template(template_names)
  File &quot;/usr/lib/python3/dist-packages/django/template/loader.py&quot;, line 47, in select_template
    raise TemplateDoesNotExist(', '.join(template_name_list), chain=chain)
django.template.exceptions.TemplateDoesNotExist: search/indexes/hyperkitty/email_text.txt
$

This is quite confusing, as 
/usr/lib/python3/dist-packages/hyperkitty/templates/search/indexes/hyperkitty/email_text.txt
certainly exists.

It appears the only impact is on searchability of the mailing list 
archive, which isn't terribly important to me, but I'd like to know why 
it throws a backtrace.

-- System Information:
Debian Release: 11.7
  APT prefers oldstable-updates
  APT policy: (500, 'oldstable-updates'), (500, 'oldstable')
Architecture: i386 (x86_64)
Foreign Architectures: amd64

Kernel: Linux 4.19.0-24-amd64 (SMP w/1 CPU thread)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/bash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages python3-django-hyperkitty depends on:
ii  fonts-glyphicons-halflings   1.009~3.4.1+dfsg-2
ii  libjs-bootstrap4             4.5.2+dfsg1-8~deb11u1
ii  libjs-sphinxdoc              3.4.3-2
ii  python3                      3.9.2-3
ii  python3-dateutil             2.8.1-6
ii  python3-django               2:2.2.28-1~deb11u1
ii  python3-django-compressor    2.4-2
ii  python3-django-extensions    3.0.3-3
ii  python3-django-gravatar2     1.4.4-2
ii  python3-django-haystack      3.0-1
ii  python3-django-mailman3      1.3.5-2
ii  python3-django-q             1.2.1-1
ii  python3-djangorestframework  3.12.1-1
ii  python3-elasticsearch        7.1.0-3
ii  python3-flufl.lock           5.0.1-1
ii  python3-mailmanclient        3.3.2-1
ii  python3-networkx             2.5+ds-2
ii  python3-robot-detection      0.4.0-2
ii  python3-tz                   2021.1-1

Versions of packages python3-django-hyperkitty recommends:
ii  mailman3-web  0+20200530-2

python3-django-hyperkitty suggests no packages.

-- no debconf information
]