bug-lilypond
[Top][All Lists]
Advanced

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

Re: musicxml2ly: AttributeError: PartGroupInfo instance has no attribute


From: Dag Odenhall
Subject: Re: musicxml2ly: AttributeError: PartGroupInfo instance has no attribute 'set_part_information'
Date: Thu, 16 Jun 2016 18:59:28 +0200

Alright, by adding the lines I had to remove from Reunion.xml to the "Hello
World" example from the MusicXML tutorial, I managed to reproduce this
traceback with a much smaller example. Of course, I don't know enough
MusicXML to tell if the result is supposed to make sense or not; it's kind
of nonsensical to add a brace to a single-staff system though it does
validate and it does import cleanly into MuseScore (though it's probably
just being lenient). Also, I don't think that's what musicxml2ly is
struggling with; it crashes for the double-staffed Reunion file as well.

On Wed, Jun 15, 2016 at 5:09 PM, Dag Odenhall <address@hidden>
wrote:

> Sorry for the spam, but here's Reunion exported from the latest MuseScore
> into non-compressed MusicXML 3.0, validated against the DTD and the XSD
> with no errors, and pretty-printed. It gives the same traceback with
> musicxml2ly.
>
> On Wed, Jun 15, 2016 at 4:10 PM, Dag Odenhall <address@hidden>
> wrote:
>
>> Attaching the MusicXML file, since musescore.com requires an account for
>> downloads.
>>
>> Copyright © 2012 Marc Sabatella
>> Licensed under the Creative Commons Attribution 3.0 License
>>
>> On Tue, Jun 14, 2016 at 7:12 PM, Dag Odenhall <address@hidden>
>> wrote:
>>
>>> Sorry, I utterly failed to mention that I'm on LilyPond 2.19.43. Tested
>>> both with the binaries from the website and the Fedora 23 package.
>>>
>>> On Tue, Jun 14, 2016 at 7:11 PM, Dag Odenhall <address@hidden>
>>> wrote:
>>>
>>>> Hello list,
>>>>
>>>> I get this traceback trying to convert the Reunion demo score from
>>>> MuseScore:
>>>>
>>>> musicxml2ly: Reading MusicXML from Reunion.xml ...
>>>> musicxml2ly: Converting to LilyPond expressions...
>>>> musicxml2ly: Converting to LilyPond expressions...
>>>> musicxml2ly: Converting to LilyPond expressions...
>>>> musicxml2ly: Converting to LilyPond expressions...
>>>> musicxml2ly: Converting to LilyPond expressions...
>>>> 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 2896, in convert
>>>>     update_score_setup (score, part_list, voices)
>>>>   File "/usr/bin/musicxml2ly", line 2794, in update_score_setup
>>>>     score_structure.set_part_information (part_id, staves_info)
>>>>   File "/usr/share/lilypond/2.19.43/python/musicexp.py", line 1941, in
>>>> set_part_information
>>>>     self.contents.set_part_information (part_id, staves_info)
>>>>   File "/usr/share/lilypond/2.19.43/python/musicexp.py", line 1780, in
>>>> set_part_information
>>>>     c.set_part_information (part_name, staves_info)
>>>> AttributeError: PartGroupInfo instance has no attribute
>>>> 'set_part_information'
>>>>
>>>> The MusicXML file is available here:
>>>> https://musescore.com/marcsabatella/reunion
>>>>
>>>> I haven't been able to reproduce this myself with a smaller score, but
>>>> Reunion works if I remove these lines:
>>>>
>>>>     <part-group type="start" number="1">
>>>>       <group-symbol>brace</group-symbol>
>>>>       </part-group>
>>>>
>>>> That bit seems to be redundant anyway in this case according to the
>>>> MusicXML specification, although it doesn't seem to be wrong either.
>>>>
>>>> If I add a stub set_staff_information method to PartGroupInfo it also
>>>> works but I get this warning instead:
>>>>
>>>> musicxml2ly: warning: Unprocessed PartGroupInfo <__main__.PartGroupInfo
>>>> instance at ...> encountered
>>>>
>>>> Maybe this is a bug in the score, or in MuseScore's MusicXML exporter?
>>>> Even so, musicxml2ly could perhaps handle faulty scores more gracefully
>>>> than a traceback or obscure warning. It doesn't look like a bug in the XML
>>>> to me, though. I ran it against the schema and it only complained about
>>>> something unrelated:
>>>>
>>>> The 'dynamics' attribute is invalid - The value '-1.11' is invalid
>>>> according to its datatype 'non-negative-decimal' - The MinInclusive
>>>> constraint failed.
>>>>
>>>> (which in deed seems to be an error and probably a bug in MuseScore.)
>>>>
>>>> Cheers,
>>>> Dag
>>>>
>>>
>>>
>>
>

Attachment: music.xml
Description: Text Data


reply via email to

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