I compiled lyx 2.3 this week (from git). Today, I opened a file using one of my own layouts, and got a failure to convet the layout file from version 60 to version 64.

Assuming the format change is about new features (and not depreciation of old stuff), I simply changed the version number from 60 to 64. That seemed to work very well.  Is there some test I can do to find out if I have a bug in my layout, or if the bug is in the conversion?

The output from LyX looked like this:

[Lengthy output from 'reconfigure' deleted]

+Inspection done.
+Read the file doc/LaTeXConfig.lyx for more information.
LyX: Ferdig!
Traceback (most recent call last):
  File "/usr/local/share/lyx23/scripts/layout2layout.py", line 1234, in <module>
    main(sys.argv)
  File "/usr/local/share/lyx23/scripts/layout2layout.py", line 1221, in main
    format = convert(lines, options.format)
  File "/usr/local/share/lyx23/scripts/layout2layout.py", line 474, in convert
    lines[i] = m.group(1) + '"' + m.group(2) + '"'
TypeError: can't concat str to bytes
TextClass.cpp (111): Conversion of layout with layout2layout.py has failed.
TextClass.cpp (361): Unable to convert /home/helgehaf/.lyx23/layouts/fu-leksjon.layout to format 64
Error reading `~/.lyx23/layouts/fu-leksjon.layout'
(Check `fu-leksjon')
Check your installation and try Options/Reconfigure...
Error: Fikk ikke tak i klassen
----------------------------------------
Kunne ikke bruke stilfilen:
fu-leksjon
fordi det er feil i den. En standardfil med standardstiler
brukes i stedet. LyX får ikke produsert korrekte utdata
på dette viset.
QXcbConnection: XCB error: 3 (BadWindow), sequence: 1214, resource id: 6597042, major code: 40 (TranslateCoords), minor code: 0


The part in Norwegian is the message about LyX being unable to use the style 'fu-leksjon' because of an error, and a standard style is used instead, and output will therefore be wrong.

The error may be mine, of course. In that case, it'd be useful if the message told me what line it was in the layout file that broke.

This is a layout I have used for over ten years, every week and with many versions of LyX. And it seems to work fine by simply changing the version number.  If there is a problem in layout2layout, finding it may be useful before release?


Helge Hafting

Reply via email to