Jack M. Lyon wrote:
I get the same thing:

"An error occurred when running the conversion script."

If I add the .py extension to lyx2lyx, the program says it can't *find* the
conversion script.

You may have intended to send this to the list instead of me; it appears that LyX-Users sets Reply-To to the original sender's address.


Executing a Python script in WinXP directly requires that the ".py" extension (if that's what the file has) have the correct association, including a full path to python.exe; and that the script be in a directory on PATH.

However, I assume the problem here is that whatever's executing lyx2lyx (relyx?) tries to run "lyx2lyx", not "lyx2lyx.py". That's why I noted in my message to the list that the Windows file-association facility was moot in this case - as long as lyx2lyx doesn't have an extension, file-association isn't going to help.

You could try the following:

1. Rename lyx2lyx to lyx2lyx.py.

2. Make sure .py files have the correct association. You can create a simple "test.py" containing just "print 'Hello'" and run that from the command line to check.

3. Create a command file named lyx2lyx.cmd to run lyx2lyx.py:

        @ /path/to/lyx2lyx.py %*

(omit the path information if lyx2lyx.py is in a directory on your path, or guaranteed in the current directory when lyx2lyx.cmd is executed).

4. Now, you should be able to run lyx2lyx; that will actually run lyx2lyx.cmd, which will run lyx2lyx.py.

I haven't actually tried this with lyx2lyx, but it works for a simple test Python script, so it might fix the lyx2lxy issue on Windows.

--
Michael Wojcik



Reply via email to