lilypond-user
[Top][All Lists]
Advanced

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

Re: musicxml2ly bug: Fails on empty <work-title /> node


From: pls
Subject: Re: musicxml2ly bug: Fails on empty <work-title /> node
Date: Sat, 21 Dec 2013 10:56:14 +0100


On 21.12.2013, at 09:14, James Harkins <address@hidden> wrote:

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.
Hi James,

we fixed this bug some time ago. See: https://github.com/Philomelos/lilypond-musicxml2ly-dev.

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…).
LilyPond cannot complain "about all the collisions that Finale generated" because they are not translated.  musicxml2ly complains about errors in the xml-file, e.g.:
warning: Cannot have two simultaneous slurs
warning: Encountered closing slur, but no slur is open

musicxml2ly-dev shows that your file contains some more faults:
x2l: warning: Negative skip -41/4 (from position 163/8 to 81/8)
x2l: warning: Negative skip -3/4 (from position 87/8 to 81/8)
x2l: warning: Negative skip -3/4 (from position 87/8 to 81/8)
x2l: warning: Negative skip -3/4 (from position 87/8 to 81/8)
x2l: warning: Negative skip -41/4 (from position 163/8 to 81/8)
x2l: warning: Negative skip -41/4 (from position 41/2 to 41/4)
x2l: warning: Negative skip -5/8 (from position 87/8 to 41/4)
x2l: warning: Negative skip -5/8 (from position 87/8 to 41/4)
x2l: warning: Negative skip -5/8 (from position 87/8 to 41/4)
x2l: warning: Negative skip -41/4 (from position 41/2 to 41/4)
x2l: warning: Negative skip -41/4 (from position 165/8 to 83/8)
x2l: warning: Negative skip -1/2 (from position 87/8 to 83/8)
x2l: warning: Negative skip -1/2 (from position 87/8 to 83/8)
x2l: warning: Negative skip -1/2 (from position 87/8 to 83/8)
x2l: warning: Negative skip -41/4 (from position 165/8 to 83/8)
x2l: warning: Negative skip -41/4 (from position 83/4 to 21/2)
x2l: warning: Negative skip -3/8 (from position 87/8 to 21/2)
x2l: warning: Negative skip -3/8 (from position 87/8 to 21/2)
x2l: warning: Negative skip -3/8 (from position 87/8 to 21/2)
x2l: warning: Negative skip -41/4 (from position 83/4 to 21/2)
x2l: warning: Negative skip -41/4 (from position 167/8 to 85/8)
x2l: warning: Negative skip -1/4 (from position 87/8 to 85/8)
x2l: warning: Negative skip -1/4 (from position 87/8 to 85/8)
x2l: warning: Negative skip -1/4 (from position 87/8 to 85/8)
x2l: warning: Negative skip -41/4 (from position 167/8 to 85/8)
x2l: warning: Negative skip -41/4 (from position 21 to 43/4)
x2l: warning: Negative skip -1/8 (from position 87/8 to 43/4)
x2l: warning: Negative skip -1/8 (from position 87/8 to 43/4)
x2l: warning: Negative skip -1/8 (from position 87/8 to 43/4)
x2l: warning: Negative skip -41/4 (from position 21 to 43/4)
x2l: warning: Negative skip -41/4 (from position 169/8 to 87/8)
x2l: warning: Negative skip -41/4 (from position 169/8 to 87/8)
x2l: warning: Negative skip -41/4 (from position 85/4 to 11)
x2l: warning: Negative skip -41/4 (from position 85/4 to 11)

This usually means that measures are incomplete.  Sibelius' xml-export is bad.  Importing and exporting the file with Finale doesn't help here.


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.
These files are not minimal examples and contain loads of faulty xml markup.  I attached a tiny example to show that musicxml2ly-dev (but not musicxml2ly) can handle empty work-title nodes.

hth
patrick

Attachment: MovementTitle-NoTitle.xml
Description: application/xml



reply via email to

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