lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: run error Lilypond-book on Windows 10


From: Archer Endrich
Subject: Re: run error Lilypond-book on Windows 10
Date: Fri, 6 Aug 2021 18:55:13 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0

Hello Carl,

That was a good idea.  When I enter 'python' on the top level of my C:\ drive, it says that the version is 3.7.4.

However, there was an earlier version in my 2.18.2 Lilypond, so I renamed that to disable it and added a full path to my 2.22.1 lilypond-book in my batch file.

I can't find any other PYTHON on my system (e.g., in Program Files).  I haven't reinstalled any other Python since moving to Windows 10, which involved a completely new hard drive.

The error message about line 376 no longer appears, but the .tex file is not created, so pdflatex has nothing to work on.

When I run the batch files, Windows keeps asking me "How do you want to open this py file?" but does not give be a Browse option. Notice the "access is denied" message in the command line display after running.  (I haven't actually been able to specify that I want LilyPond to run it.

This is the display:

C:\P3L\lpbk>ALMdurasnumber.bat

C:\P3L\lpbk>C:\Lilypond2221\usr\bin\lilypond-book --output=out --pdf ALMdurasnumber.lytex
Access is denied.

C:\P3L\lpbk>cd out

C:\P3L\lpbk\out>pdflatex ALMdurasnumber.tex
This is pdfTeX, Version 3.141592653-2.6-1.40.23 (MiKTeX 21.7)
entering extended mode
! I can't find file `ALMdurasnumber.tex'.
<*> ALMdurasnumber.tex

Please type another input file name:
! Emergency stop.
<*> ALMdurasnumber.tex

!  ==> Fatal error occurred, no output PDF file produced!
Transcript written on texput.log.
Terminate batch job (Y/N)? y

C:\P3L\lpbk\out>cd ..

Maybe David Wright's suggestion was correct, namely that "Something looks odd about C:\Lilypond2221\usr\bin\lilypond-book.py
in that I would expect either C:\Lilypond2221\bin\lilypond-book
or C:\Lilypond2221\LILYPOND\usr\bin\lilypond-book where LILYPOND
is either lowercase or camelcase (I have seen both). "

Perhaps lilypond-book needs that path -- but my normal LilyPond notation works OK with my 'odd' path.

So I'm still puzzled.
Archer

On 06/08/2021 17:34, Carl Sorensen wrote:
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.com@gnu.org on behalf of 
archerhgm@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

[Prev in Thread] Current Thread [Next in Thread]