On Wed, 2023-12-06 at 16:37 +0100, kzsta...@gmail.com wrote:
> 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-lists
>  
> Kees

You are right. :-)

The fix is quite simple as you suggest, replace xrange with range.

One small note about the above, 2.4 can still work with Python 2.
Fortunately, in this regard, the above change is compatible with Python
2 and so it is the correct, and safe, choice to apply to LyX 2.4.

I took this opportunity to check for other occurrences of xrange in 2.4
and that was the last case.
-- 
José Abílio
-- 
lyx-users mailing list
lyx-users@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-users

Reply via email to