It was failing when current message context wasn't found in the .po file. E.g. there were not messages with context "View3D", "Operator", ... and you would try to edit translation for the element that uses that context.
Traceback
```
Error: Python: Traceback (most recent call last):
File "\Blender\4.0\scripts\addons\ui_translate\edit_translation.py", line 287, in invoke
msgs.find_best_messages_matches(self, self.msgmap, self.rna_ctxt, self.rna_struct, self.rna_prop, self.rna_enum)
File "\Blender\4.0\scripts\modules\bl_i18n_utils\utils.py", line 798, in find_best_messages_matches
k = ctxt_to_msg[rna_ctxt].copy()
KeyError: 'Operator'