[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: XML to .ly and Lilypond, again
From: |
Phil Holmes |
Subject: |
Re: XML to .ly and Lilypond, again |
Date: |
Sun, 14 May 2017 14:31:33 +0100 |
----- Original Message -----
From: "Leszek Wronski" <address@hidden>
To: <address@hidden>
Sent: Friday, May 12, 2017 12:54 PM
Subject: Re: XML to .ly and Lilypond, again
Dear Phil,
I read through the 2 pages of comments at the link you provided. Is
the ultimate suggestion the one in your last comment, that is, "I
believe this patch requires Python 2.7, and we ship 2.4. As a result,
windows users can no longer use musicxml2ly." ?
If so, I should just mention that I'm getting the errors on an Ubuntu
16.04 system with Python version 2.7.12.
Cheers,
Leszek.
OK - I've done some more looking at this. Using a test file produced by
Sibelius, I get no problems using musicxml2ly on Ubuntu 14.04, Python 2.7.6.
I think it would be helpful if people with other Ubuntu/Pytho versions could
check an XML file (I can email my test to anyone who can check) to see
whether the incorrect encoding of text is happening.
If I try the same file on Windows, with LilyPond 2.19.43, all is well. With
2.19.44 I get the same errors as Leszek:
Traceback (most recent call last):
File "C:\Program Files (x86)\LilyPondV2.19.44\usr\bin\musicxml2ly.py",
line 3269, in ?
main()
File "C:\Program Files (x86)\LilyPondV2.19.44\usr\bin\musicxml2ly.py",
line 3263, in main
voices = convert(filename, options)
File "C:\Program Files (x86)\LilyPondV2.19.44\usr\bin\musicxml2ly.py",
line 3175, in convert
score_information.print_ly(printer)
File "out/musicexp.py", line 855, in print_ly
File "out/musicexp.py", line 848, in format_header_strings
File "out/musicexp.py", line 123, in newline
File "C:\Program Files
(x86)\LilyPondV2.19.43\usr\lib\python2.4\codecs.py", line 501, in write
return self.writer.write(data)
File "C:\Program Files
(x86)\LilyPondV2.19.43\usr\lib\python2.4\codecs.py", line 178, in write
data, consumed = self.encode(object, self.errors)
UnicodeDecodeError: 'utf8' codec can't decode byte 0xa9 in position 39:
unexpected code byte
However, if I try a file with a simpler header (e.g.
02d-Rests-Multimeasure-TimeSignatures.xml in the regtest suite), then the
script runs successfully, but I get an output file with spurious nulls in
text fields:
\header {
texidoc =
"�M�u�l�t�i�-�M�e�a�s�u�r�e�
�r�e�s�t�s� �s�h�o�u�l�d�
�a�l�w�a�y�s� �
� � � � � � � � � � �b�e�
�c�o�n�v�e�r�t�e�d� �i�n�t�o�
�d�u�r�a�t�i�o�n�s� �t�h�a�t�
�a�r�e� �a� �m�u�l�t�i�p�l�e�
�o�f� �t�h�e� �t�i�m�e� �
� � � � � � � � � �
�s�i�g�n�a�t�u�r�e�.�"
�
}
So it looks clear that something probably introduced in
https://sourceforge.net/p/testlilyissues/issues/4751/ is causing encoding
problems on Windows. As I say, I can't reproduce the problem on Linux.
--
Phil Holmes
- Re: XML to .ly and Lilypond, again, (continued)
- Re: XML to .ly and Lilypond, again, Leszek Wroński, 2017/05/12
- Re: XML to .ly and Lilypond, again, Leszek Wroński, 2017/05/12
- Re: XML to .ly and Lilypond, again, Robert Blackstone, 2017/05/14
- Message not available
- Re: XML to .ly and Lilypond, again, Robert Blackstone, 2017/05/15
- Re: XML to .ly and Lilypond, again, Leszek Wroński, 2017/05/16
- Re: XML to .ly and Lilypond, again, Leszek Wroński, 2017/05/16
Re: XML to .ly and Lilypond, again, Leszek Wroński, 2017/05/12
- Re: XML to .ly and Lilypond, again, Phil Holmes, 2017/05/12
- Re: XML to .ly and Lilypond, again,
Phil Holmes <=
- Re: XML to .ly and Lilypond, again, Phil Holmes, 2017/05/14
- Re: XML to .ly and Lilypond, again, Urs Liska, 2017/05/14
- Re: XML to .ly and Lilypond, again, Phil Holmes, 2017/05/14
- Re: XML to .ly and Lilypond, again, with a fix, David Wright, 2017/05/15
- Re: XML to .ly and Lilypond, again, Johan Vromans, 2017/05/14
Re: XML to .ly and Lilypond, again, zs.hassia, 2017/05/14