lilypond-user
[Top][All Lists]
Advanced

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

Re: XML to .ly and Lilypond, again


From: Leszek Wroński
Subject: Re: XML to .ly and Lilypond, again
Date: Tue, 16 May 2017 10:00:46 +0200

Whoops. I had responded before reading the new digests, apologies;
seems David has discovered the root of the issue, thank you very much!

Cheers,

Leszek.

On 16 May 2017 at 09:47, Leszek Wroński <address@hidden> wrote:
> Hi Robert,
>
> thanks! I tried your file and I get similar messages:
>
> -----------------
> musicxml2ly: Reading MusicXML from Kyrie_copy.xml ...
> musicxml2ly: Converting to LilyPond expressions...
> (....)
> musicxml2ly: Output to `Kyrie_copy.ly'
> Traceback (most recent call last):
>   File "/home/leszek/lilypond/usr/bin/musicxml2ly", line 3269, in ?
>     main()
>   File "/home/leszek/lilypond/usr/bin/musicxml2ly", line 3263, in main
>     voices = convert(filename, options)
>   File "/home/leszek/lilypond/usr/bin/musicxml2ly", line 3175, in convert
>     score_information.print_ly(printer)
>   File "/home/leszek/lilypond/usr/share/lilypond/current/python/musicexp.py",
> line 855, in print_ly
>     self.format_header_strings(k, v, printer)
>   File "/home/leszek/lilypond/usr/share/lilypond/current/python/musicexp.py",
> line 848, in format_header_strings
>     printer.newline()
>   File "/home/leszek/lilypond/usr/share/lilypond/current/python/musicexp.py",
> line 123, in newline
>     self._file.write (self._line + '\n')
>   File "/home/leszek/lilypond/usr/lib/python2.4/codecs.py", line 501, in write
>     return self.writer.write(data)
>   File "/home/leszek/lilypond/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
> 19: unexpected code byte
> ------------------
>
> I'm using Ubuntu 16.04 64 bit Python 2.7.12, and Lilypond 2.19.48.
>
> So is it the case that musicxml2ly is trying to apply the ''utf8'
> codec' to the whole file while parts of it are conded in utf16?
>
> Cheers,
>
> Leszek.
>
> On 15 May 2017 at 16:43, Robert Blackstone <address@hidden> wrote:
>> Hi Leszek,
>>
>> Thanks for your reaction to my post.
>> Interesting, yes, but of little help to you.
>>
>> We could do a little test.
>>
>> What happens if you use the xlm-file that can be downloaded from this link
>> here?
>>
>> https://dl.dropboxusercontent.com/u/512573/FileChute/Kyrie_copy.zip
>>
>> Best regards,
>> Robert
>>
>>
>> On 15 May 2017, at 08:22 , Leszek Wroński <address@hidden> wrote:
>>
>> Hi Robert,
>>
>> thanks! It's interesting that all is fine on a Mac. I just wanted to
>> mention that I'm only using Finale, that is, Windows, to produce the
>> XML. I then switch to Ubuntu 16.04 to use musicxml2ly because that's
>> the system I generally use. So the problem is also present on Linux.
>>
>> This is actually a nice practical reason to use a Mac ;)
>>
>> Cheers,
>>
>> Leszek.
>>
>> On 14 May 2017 at 12:42, Robert Blackstone <address@hidden>
>> wrote:
>>
>> Hi Leszek,
>>
>> Out of curiosity I downloaded and processed the Kyrie.xml, from the link you
>> attached to your post of 12-05-17.
>> I was curious in particular because I mostly use the same procedure for
>> engraving with LilyPond as you do, starting with Finale, except that I'm on
>> a Mac (OSX 10.9.5 also known as Mavericks).
>> So I imported your file in Frescobaldi, and then copied and pasted it in
>> TeXShop, my favourite editor, which processed your file without any problem
>> (both with LilyPond version 2.18.2 and 2.19.58.1).
>>
>> You can find the results here:
>>
>> https://dl.dropboxusercontent.com/u/512573/FileChute/LilyPond-test_Kyrie_from_xml-file.zip
>>
>> So apparently for a Mac there is nothing wrong, neither with your xml-file
>> nor with recent musicxml2ly.
>> It may be of litte help to you (as  long as you stay on Windows ;-)) but it
>> could perhaps help you in narrowing down the search for the source of
>> trouble in your system.
>>
>> Best regards
>>
>> Robert Blackstone
>>
>>
>>
>>
>> On 12 May 2017, at 13:42 , Leszek Wroński <address@hidden> wrote:
>>
>> Dear Guys,
>>
>> first, thank you very much for the replies!
>>
>> Second, for a little bit of detective work. I have not updated my
>> Finale in years, so if it produced correct XML files in the past, it
>> should do the same now (I always write using a similar really basic
>> setup, since actual editing is to be done in Lilypond). Anyway, I
>> tracked down an XML file which converted correctly in 2.19.5. I wanted
>> to check whether I would get the 'lots of null characters' problem
>> currently. To my surprise, I didn't even get to that part. Musicxml2ly
>> gave me the following:
>>
>> ----------------------------------------------
>> musicxml2ly: Reading MusicXML from Kyrie.xml ...
>> musicxml2ly: Converting to LilyPond expressions...
>> (.....)
>> musicxml2ly: Output to `Kyrie.ly'
>> Traceback (most recent call last):
>> File "/home/leszek/lilypond/usr/bin/musicxml2ly", line 3269, in ?
>>   main()
>> File "/home/leszek/lilypond/usr/bin/musicxml2ly", line 3263, in main
>>   voices = convert(filename, options)
>> File "/home/leszek/lilypond/usr/bin/musicxml2ly", line 3175, in convert
>>   score_information.print_ly(printer)
>> File "/home/leszek/lilypond/usr/share/lilypond/current/python/musicexp.py",
>> line 855, in print_ly
>>   self.format_header_strings(k, v, printer)
>> File "/home/leszek/lilypond/usr/share/lilypond/current/python/musicexp.py",
>> line 848, in format_header_strings
>>   printer.newline()
>> File "/home/leszek/lilypond/usr/share/lilypond/current/python/musicexp.py",
>> line 123, in newline
>>   self._file.write (self._line + '\n')
>> File "/home/leszek/lilypond/usr/lib/python2.4/codecs.py", line 501, in
>> write
>>   return self.writer.write(data)
>> File "/home/leszek/lilypond/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
>> 19: unexpected code byte
>> ------------------------------------------------
>>
>> (Isn't '0xa9' the copyright character? ;))
>>
>> The XML file, if someone wants to take a peek, is here:
>> https://www.dropbox.com/s/1dnv1hthyp7ss5h/Kyrie.xml?dl=0
>>
>> Unfortunately it seems I do not have an XML file about which I could
>> be sure that it converted correctly using a version of Lilypond newer
>> than 2.19.5. Anyway, since one and the same XML file stopped
>> converting correctly, it indeed seems that in the meantime some
>> encoding issues have been introduced to musicxml2ly (I'm using 2.19.48
>> now).
>>
>> If you think I could be of any additional help (well, not sure this
>> was helpful at all, but I'm trying ;)), please tell me what info I
>> should provide.
>>
>> Cheers and thank you again,
>>
>> Leszek.
>>
>> _______________________________________________
>> lilypond-user mailing list
>> address@hidden
>> https://lists.gnu.org/mailman/listinfo/lilypond-user
>>
>>
>>



reply via email to

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