On Tue, 2023-09-05 at 21:07 -0400, Richard Kimberly Heck wrote:
> lyx2lyx warning: An error occurred in 604, <function revert_vcolumns2
> at 0x7fe2423d7600> 
>  Traceback (most recent call last): 
>   File "/usr/local/share/lyx/lyx2lyx/lyx2lyx", line 97, in <module> 
>     main() 
>   File "/usr/local/share/lyx/lyx2lyx/lyx2lyx", line 91, in main 
>     doc.convert() 
>   File "/usr/local/share/lyx/lyx2lyx/LyX.py", line 702, in convert 
>     conv(self) 
>   File "/usr/local/share/lyx/lyx2lyx/lyx_2_4.py", line 4154, in
> revert_vcolumns2 
>     elif count_pars_in_inset(document.body, begcell + 2) > 1: 
>          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
>   File "/usr/local/share/lyx/lyx2lyx/parser_tools.py", line 692, in
> count_pars_in_inset 
>     if m and get_containing_inset(lines, j)[1] == ins[1]: 
>              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^ 
>  TypeError: 'bool' object is not subscriptable 

This is what the culprit function has to say in parser_tools:

get_containing_inset(lines, i):
  Finds out what kind of inset line i is within. Returns a
  list containing what follows \\begin_inset on the line
  on which the inset begins, plus the starting and ending line.
  Returns False on any kind of error or if it isn't in an inset.
  So get_containing_inset(document.body, i) might return:
    ("CommandInset ref", 300, 306)
  if i is within an InsetRef beginning on line 300 and ending
  on line 306.

The corresponding code says:
  if inset == "":
      # shouldn't happen
      return False

So it seems that what should not happen happened. :-)

This means that something unexpected is happening and the code is not
able to react to it.

This what I can say for now. :-)
-- 
José Abílio
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to