Closed GoogleCodeExporter closed 9 years ago
I'm not quite sure why that is happening. It seems to fail on the waitpid
syscall.
Maybe the following works in LilyPond.py
Remove the line :
sts = os.waitpid(p.pid, 0)
And replace:
p = subprocess.Popen(command, shell=True)
with:
p = subprocess.Popen(command, shell=True).wait()
Original comment by Rhijnauwen@gmail.com
on 9 Sep 2009 at 8:33
When I make those two changes, it does seem to run.
Though, this may be a separate issue, or a problem with my code, but it fails
silently and does not generate anything.
mingus.extra.LilyPond.to_png(from_Note(Note()), "\\temp\\out.png")
or
mingus.extra.LilyPond.to_png("c'", "\\temp\\out.png")
generate this out.png.ly:
\version "2.10.33"
c'
which fails with:
GNU LilyPond 2.12.2
Processing `out.png.ly'
Parsing...
out.png.ly:2:0: error: syntax error, unexpected NOTENAME_PITCH
c'error: failed files: "out.png.ly"
Original comment by austinlu...@gmail.com
on 10 Sep 2009 at 11:13
Yes, that seems to be a different issue. I'm currently not on a computer with
LilyPond installed, but I'll have a look later today / early tomorrow.
I'll will also change the subprocess line in the code-base, since I found out
waitpid
is a POSIX syscall and understandably doesn't work on Windows.
Thanks for taking the time to report these issues. It's much appreciated.
Original comment by Rhijnauwen@gmail.com
on 10 Sep 2009 at 3:36
This issue was closed by revision r565.
Original comment by Rhijnauwen@gmail.com
on 12 Sep 2009 at 7:44
I just checked in the fix to your first problem and also made some changes to
be able
to convert single Notes and NoteContainers. The problem was that when you want
to use
these notes on their own, they have to be wrapped in parenthesis, like this: {
c' }
or else LilyPond will complain with an unexpected NOTENAME_PITCH.
In version 0.4.3.0 (which is not yet released, but already up in the
repository) you
can use the 'standalone' argument to toggle the parenthesis. It is set to True
by
default, so your example will work without change:
LilyPond.to_png(LilyPond.from_Note(Note("C")), "out.png")
Original comment by Rhijnauwen@gmail.com
on 12 Sep 2009 at 7:50
Original issue reported on code.google.com by
austinlu...@gmail.com
on 9 Sep 2009 at 1:23