Skip to content

Staging website fails to update with KeyError

Subject: Cron <weblate@translate> /var/lib/weblate/scripts/update-staging-website.py
Date: Mon, 06 Oct 2025 03:21:02 +0000

Traceback (most recent call last):
  File "/app/venv/lib/python3.13/site-packages/weblate/formats/base.py", line 489, in _find_unit_bilingual
    return (self._unit_index[id_hash], False)
	    ~~~~~~~~~~~~~~~~^^^^^^^^^
KeyError: 1852217505737432870

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/scripts/save-suggestions.py", line 179, in <module>
    commandline()
    ~~~~~~~~~~~^^
  File "/scripts/save-suggestions.py", line 140, in commandline
    update_unit(translation, unit, unit.target)
    ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/scripts/save-suggestions.py", line 58, in update_unit
    pounit, add = translation.store.find_unit(unit.context, src)
		  ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
  File "/app/venv/lib/python3.13/site-packages/weblate/formats/base.py", line 501, in find_unit
    return self._find_unit_bilingual(context, source)
	   ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
  File "/app/venv/lib/python3.13/site-packages/weblate/formats/base.py", line 491, in _find_unit_bilingual
    raise UnitNotFoundError(context, source) from error
weblate.formats.base.UnitNotFoundError: Unit not found: supporter