On Wednesday 02 April 2008 12:49:37 Kornel Benko wrote: > Hi, > some of my old lyx-files cannot be read by the newest lyx. > > lyx2lys tries to convert to 325-format, which leads to an error. > > Trying manually to convert with lyx2lyx, it was ok up to the 310 -format, > e.g.: python -tt '/usr/local/share/lyx1.6/lyx2lyx/lyx2lyx' -t 310 -o xx.lyx > my_very_loving.lyx ==> no error, > but > python -tt '/usr/local/share/lyx1.6/lyx2lyx/lyx2lyx' -t 311 -o xx.lyx > my_very_loving.lyx ==> > Warning: An error ocurred in 311, <function convert_ams_classes > at > 0x8299fb4> Traceback (most recent call last): > File "/usr/local/share/lyx1.6/lyx2lyx/lyx2lyx", line 77, in > <module> > doc.convert() > File "/usr3/local/share/lyx1.6/lyx2lyx/LyX.py", line 489, in > convert > conv(self) > File "/usr3/local/share/lyx1.6/lyx2lyx/lyx_1_6.py", line 808, > in > convert_ams_classes document.warning("Weirdly formed \\begin_layout at line > " + i + " of body!") TypeError: cannot concatenate 'str' and 'int' objects > > === > Kornel
Thanks for the report I have fixed this bug in svn. The fix is: Index: lyx_1_6.py =================================================================== --- lyx_1_6.py (revision 24091) +++ lyx_1_6.py (working copy) @@ -805,7 +805,7 @@ return m = r.match(document.body[i]) if m == None: - document.warning("Weirdly formed \\begin_layout at line " + i + " of body!") + document.warning("Weirdly formed \\begin_layout at line %d of body!" % i) i += 1 continue m = m.group(1) -- José Abílio