On Sun, Dec 11, 2022 at 09:42:33PM +0000, José Matos wrote: > On Sun, 2022-12-11 at 15:29 -0500, Scott Kostyshak wrote: > > convert_hebrew_parentheses > > elif current_languages[-1] == 'hebrew' and not > > line.startswith('\\'): > > IndexError: list index out of range > > This happens only when current_languages is an empty list: > > In [1]: [][-1] > ----------------------------------------------------------------------- > IndexError Traceback (most recent call last) > Cell In [1], line 1 > ----> 1 [][-1] > > IndexError: list index out of range
The problem is that the code is supposed to append, then pop. then append, then pop. There is a mismatch somewhere and the code pops without a preceding append, so the list of languages is empty. Scott -- lyx-devel mailing list lyx-devel@lists.lyx.org http://lists.lyx.org/mailman/listinfo/lyx-devel