When exporting to  LyX Archive (zip) in LyX-2.4.0-beta5 on Windows-11, I get
the message "Cannot convert file"; see the attached screen print. It appears
that this is caused by the use of xrange in lyxpak.py; see the attached part
of the log file of LyX running as lyx -dbg all.  In LyX-2.3.7, exporting
works fine.

LyX-2.3 uses Python2, and LyX-2.4 uses Python3. In Python3, xrange has been
removed, and replaced by an extended version of range; see
https://docs.python.org/3/whatsnew/3.0.html#views-and-iterators-instead-of-l
ists

 

Kees

 

 

 

Attachment: testxp.lyx
Description: application/lyx

BufferParams.cpp (Undo.cpp330): Checking whether document is in a system dir... 
( no
596): ------- End of group 7 of buffer 0000014A8D7EEF00support\FileName.cpp 
(629): Checksumming "
F:/Users/Kees/Documenten/Papers/LyX/Test/Pak/testxp.lyx" 3132205323 lasted 2 ms.
BufferView.cpp (3555Converter.cpp (527): Converting from  lyx to lyxzip
):              *** START DRAWING ***Converter.cpp (681): Calling python -tt 
$$s/scripts/lyxpak.py 
"F:/Users/Kees/Documenten/Papers/LyX/Test/Pak/"/"testxp.lyx"

BufferView.cpp (3600): Strategy: FullScreenUpdate
support\Systemcall.cpp (TextMetrics.cpp265): Running: python -tt "C:/Program 
Files/LyX 2.4/Resources/scripts/lyxpak.py" 
"F:/Users/Kees/Documenten/Papers/LyX/Test/Pak/"/"testxp.lyx"
 (2120): main text redraw pit=0 row=0 full_repaint
BufferView.cpp (3624):           *** END DRAWING ***
BufferView.cpp (611):  Updating scrollbar: height: 1 curr par: 0 default height 
25
BufferView.cpp (627): storing height for pit 0 : 73
Traceback (most recent call last):
  File "C:\Program Files\LyX 2.4\Resources\scripts\lyxpak.py", line 393, in 
<module>
    argv = [argv_unicode[i].encode('utf-8') for i in xrange(1, argc.value)]
                                                     ^^^^^^
NameError: name 'xrange' is not defined. Did you mean: 'range'?
support\Systemcall.cpp (306): Systemcall: 'python -tt "C:/Program Files/LyX 
2.4/Resources/scripts/lyxpak.py" 
"F:/Users/Kees/Documenten/Papers/LyX/Test/Pak/"/"testxp.lyx"' finished with 
exit code 1
Error: Cannot convert file
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users

Reply via email to