Trevor Daniels wrote

Running lilypond-book
lilypond-book.py (GNU LilyPond) 2.15.25
Reading C:/Users/Trevor/LilyPond-git/Documentation/notation/contemporary.itely..
.
Running texi2pdf on file c:\users\trevor\appdata\local\temp\tmpt4vqnk.texi to de
tect default page settings.

Traceback (most recent call last):
 File "c:/program files/lilypond/usr/bin/lilypond-book.py", line 739, in ?
   main ()
File "c:/program files/lilypond/usr/bin/lilypond-book.py", line 722, in main
   chunks = do_file (files[0])
File "c:/program files/lilypond/usr/bin/lilypond-book.py", line 595, in do_file
   global_options.formatter.init_default_snippet_options (source)
 File "out/book_texinfo.py", line 279, in init_default_snippet_options
 File "out/book_texinfo.py", line 213, in get_texinfo_width_indent
 File "/usr/lib/python2.4/subprocess.py", line 549, in __init__
OSError: [Errno 22] Invalid argument
Lilypond-book returned code 1

Graham

The invalid argument in subprocess.py is the U in
 self.stdout = os.fdopen(c2pread, 'rU', bufsize)
as I remarked some time ago.

The U means invoke universal newlines, see http://www.python.org/dev/peps/pep-0278/. I thought at first universal newlines might not be enabled, but it is, according to the test in the ref above.

If I remove the U from the calls to fdopen in lines 549 and 554 then I get:

Traceback (most recent call last):
 File "c:/program files/lilypond/usr/bin/lilypond-book.py", line 739, in ?
   main ()
File "c:/program files/lilypond/usr/bin/lilypond-book.py", line 722, in main
   chunks = do_file (files[0])
File "c:/program files/lilypond/usr/bin/lilypond-book.py", line 595, in do_file
   global_options.formatter.init_default_snippet_options (source)
File "c:\program files\lilypond\usr\share\lilypond\current\python\book_texinfo
.py", line 281, in init_default_snippet_options
texinfo_defaults = get_texinfo_width_indent (source, self.global_options); File "c:\program files\lilypond\usr\share\lilypond\current\python\book_texinfo
.py", line 216, in get_texinfo_width_indent
   (parameter_string, error_string) = proc.communicate ()
File "c:\Program Files\LilyPond\usr\lib\python2.4\subprocess.py", line 773, in
communicate
   stdout_thread.start()
File "c:\Program Files\LilyPond\usr\lib\python2.4\threading.py", line 418, in
start
   _sleep(0.000001)    # 1 usec, to let the thread run (Solaris hack)
IOError: (0, 'Error')
Unhandled exception in thread started by
Error in sys.excepthook:

Original exception was:
Lilypond-book returned code 1

If I then comment out the sleep in theading.py, lilypond-book runs to completion. It uses the default values for linewidth, etc, as it can't find texi2pdf, of course, just as if I'd bypassed Reinhold's code.

Trevor

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to