In case anybody is working on musicxml2ly:
I just found that it doesn't handle the case of an XML document where the
title node exists, but is empty. I've uploaded a zip archive of two
musicxml documents.
http://ubuntuone.com/0iNRBh17UxPJWlVJikFYVD
** 13-1220-li-xuanyi.xml -- The original file from my student, exported
from Sibelius on Mac.
$ musicxml2ly 13-1220-li-xuanyi.xml
musicxml2ly: Reading MusicXML from 13-1220-li-xuanyi.xml ...
Traceback (most recent call last):
File "/usr/local/lilypond/usr/bin/musicxml2ly", line 2984, in ?
main()
File "/usr/local/lilypond/usr/bin/musicxml2ly", line 2979, in main
voices = convert (filename, options)
File "/usr/local/lilypond/usr/bin/musicxml2ly", line 2881, in convert
score_information = extract_score_information (tree)
File "/usr/local/lilypond/usr/bin/musicxml2ly", line 201, in
extract_score_information
set_if_exists ('title', movement_title.get_text ())
AttributeError: 'NoneType' object has no attribute 'get_text'
** 13-1220-li-xuanyi-finale.xml -- Another version, made by importing the
original into Finale 2010 and re-exporting to musicxml. This one is fine in
musicxml2ly, producing a LilyPond file that compiles successfully (apart
from LilyPond complaining about all the collisions that Finale
generated...).
A notable difference is that the one from Sibelius includes the following,
but Finale omits it.
<work>
<work-title />
</work>
If I remove those lines, then musicxml2ly gets past this error... only to
fail later. So this document (the original) might be a good test case for
musicxml2ly's error recovery.
I'm on 2.16.2.
Thanks,
hjh
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user