You might check the following:

Is there a python.exe that is somewhere in the path ahead of Lilypond's python?

What is your system python version?

The method you used to run lilypond-book does not include an explicit call to 
the lilypond's python; IIUC you're just using the .py extension to allow 
Windows to choose the application for that extenstion, and it may be another 
python somewhere in your system.

HTH,

Carl


On 8/6/21, 10:22 AM, "lilypond-user on behalf of Archer Endrich" 
<lilypond-user-bounces+carl.d.sorensen=gmail....@gnu.org on behalf of 
archer...@gmail.com> wrote:

    Hello Aaron,
    
    Thank you for your reply.  I've checked the version of python.exe in my 
    Lilyond usr\bin and it's 3.7.4, so it is puzzling that it is flagging an 
    error about something not valid prior to 2.6.  I can't think where to go 
    from here.
    
    Thanks.
    Archer
    P.S. I hope I've replied properly to yourself and to the user-group.
    
    On 06/08/2021 16:55, Aaron Hill wrote:
    > On 2021-08-06 8:46 am, Archer Endrich wrote:
    >> [ . . . ]
    >> C:\P3L\lpbk>lilypond-book --output=out --pdf ALMdurasnumber.lytex
    >>   File "C:\Lilypond2221\usr\bin\lilypond-book.py", line 376
    >>     except subprocess.CalledProcessError as e:
    >>                                           ^
    >> SyntaxError: invalid syntax
    >> [ . . . ]
    >> Perhaps someone could check out line 376 for me.  Thanks again.
    >
    > The error message clearly indicates this is invalid syntax for the 
    > version of Python you are running.  In particular, "as" is not valid 
    > prior to 2.6 according to [1].
    >
    > [1]: 
    > 
https://stackoverflow.com/questions/2535760/python-try-except-comma-vs-as-in-except#2535770
    >
    >
    > -- Aaron Hill
    
    

Reply via email to