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

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Noam Postavsky
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.

_______________________________________________
bug-lilypond mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-lilypond

musicxml2ly-multi-display-text.patch (668 bytes) Download Attachment
example-musicxml-display-part-bug.xml (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

Noam Postavsky
On Thu, 5 Mar 2020 at 22:45, Noam Postavsky <[hidden email]> wrote:
>
> The attached example-musicxml-display-part-bug.xml shows a minimal
> example to trigger the bug. It gives this output:

> get_maybe_exist_typed_child
>     raise "More than 1 child", klass

> 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>

Ping?

_______________________________________________
bug-lilypond mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-lilypond
Reply | Threaded
Open this post in threaded view
|

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

Noam Postavsky
On Tue, 24 Mar 2020 at 18:38, Noam Postavsky <[hidden email]> wrote:
>
> On Thu, 5 Mar 2020 at 22:45, Noam Postavsky <[hidden email]> wrote:
> >
> > The attached example-musicxml-display-part-bug.xml shows a minimal
> > example to trigger the bug. It gives this output:
>
> > get_maybe_exist_typed_child
> >     raise "More than 1 child", klass

> Ping?

Ping??

_______________________________________________
bug-lilypond mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-lilypond
Reply | Threaded
Open this post in threaded view
|

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

Noam Postavsky
On Sun, 26 Apr 2020 at 13:12, Noam Postavsky <[hidden email]> wrote:

> > > The attached example-musicxml-display-part-bug.xml shows a minimal
> > > example to trigger the bug. It gives this output:
> >
> > > get_maybe_exist_typed_child
> > >     raise "More than 1 child", klass
>
> > Ping?
> Ping??

Ping???

_______________________________________________
bug-lilypond mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-lilypond
Reply | Threaded
Open this post in threaded view
|

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

Valentin Villenave-3
On 5/18/20, Noam Postavsky <[hidden email]> wrote:
>> > Ping?
>> Ping??
> Ping???

Greetings Noam,
thanks for being so persistent; I’m not very familiar with musicxml2ly
but I submitted your patch here on your behalf:

https://gitlab.com/lilypond/lilypond/-/merge_requests/65

As far as I can see it doesn’t break anything from our regression
tests, so unless someone more knowledgeable than me objects, it should
be merged in the next version (2.21.2).

Thanks again, stay tuned!

Cheers,
-- V.

_______________________________________________
bug-lilypond mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-lilypond
Reply | Threaded
Open this post in threaded view
|

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

Noam Postavsky
On Tue, 19 May 2020 at 12:18, Valentin Villenave <[hidden email]> wrote:

> As far as I can see it doesn’t break anything from our regression
> tests, so unless someone more knowledgeable than me objects, it should
> be merged in the next version (2.21.2).

Thanks!

_______________________________________________
bug-lilypond mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/bug-lilypond