bug-lilypond
[Top][All Lists]
Advanced

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

musicxml2ly fails on <part-name-display> with multiple <display-text>


From: Noam Postavsky
Subject: musicxml2ly fails on <part-name-display> with multiple <display-text>
Date: Thu, 5 Mar 2020 22:45:53 -0500

The attached example-musicxml-display-part-bug.xml shows a minimal
example to trigger the bug. It gives this output:

musicxml2ly: Reading MusicXML from example-musicxml-display-part-bug.xml ...
musicxml2ly: Converting to LilyPond expressions...
Traceback (most recent call last):
  File "/usr/bin/musicxml2ly", line 2986, in <module>
    main()
  File "/usr/bin/musicxml2ly", line 2981, in main
    voices = convert (filename, options)
  File "/usr/bin/musicxml2ly", line 2892, in convert
    score = extract_score_structure (mxl_pl, staff_info)
  File "/usr/bin/musicxml2ly", line 430, in extract_score_structure
    staff = read_score_part (el)
  File "/usr/bin/musicxml2ly", line 383, in read_score_part
    staff.instrument_name = extract_display_text (partname)
  File "/usr/bin/musicxml2ly", line 907, in extract_display_text
    child = el.get_maybe_exist_named_child ("display-text")
  File "/usr/share/lilypond/2.18.2/python/musicxml.py", line 114, in
get_maybe_exist_named_child
    return self.get_maybe_exist_typed_child (get_class (name))
  File "/usr/share/lilypond/2.18.2/python/musicxml.py", line 123, in
get_maybe_exist_typed_child
    raise "More than 1 child", klass
TypeError: exceptions must be old-style classes or derived from
BaseException, not str

The original case where I ran into this is
http://www1.cpdl.org/wiki/images/5/54/Ws-mont-bvf.mxl, which says

   <software>Sibelius 7.5.1</software>
   <software>Direct export, not from Dolet</software>
   <encoding-description>Sibelius / MusicXML 3.0</encoding-description>

I propose the attached musicxml2ly-multi-display-text.patch as a fix.

Attachment: musicxml2ly-multi-display-text.patch
Description: Text Data

Attachment: example-musicxml-display-part-bug.xml
Description: XML document


reply via email to

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