[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: musicxml2ly fails on line 824 -> dirty fix
From: |
Élie Gouzien |
Subject: |
Re: musicxml2ly fails on line 824 -> dirty fix |
Date: |
Tue, 16 Jul 2024 13:09:19 +0200 |
Thanks for the answer,
I'm surprised by your answer as with 2.24.3 there is a clear error and with
the fix I proposed the output is usable (also far from being perfect).
Anyway, please don't consider it as a help request, as I'm aware that the
file is invalid, but as a bug fix proposal. So if you consider the file to
be too invalid for this to be relevant, you can just forget about it.
Élie
Le mar. 16 juil. 2024 à 10:13, Werner LEMBERG <wl@gnu.org> a écrit :
>
> > Hello, I have a file for which `musicxml2ly` fails, because in line
> > 824 variable `i2` is `None`. Changing line 824 from `if i1 > i2:`
> > to `if not i2 or i1 > i2:` fixed my issue.
> >
> > I'm sorry, but I don't have time to investigate this issue more
> > (just went in "don't think, fix it mode"). I can't guarantee that
> > the file I worked on is correctly formed. Nevertheless, I pass you
> > the information. I can send the file on request.
> >
> > Thanks again for making Lilypond !
>
> Élie sent me the file privately.
>
> Using the current git version of `musicxml2ly` I couldn't repeat the
> problem; there is no error. However, there are a very large number of
> warnings – and the output is completely unusable.
>
> The XML file was created with MuseScore 3.2.3. I then tried to open
> the file with MuseScore 4.2.3, and it failed because the XML file is
> invalid (it happens quite often that MuseScore cannot read XML files
> that it produces itself):
>
> Fatal error: line 83, column 18: Content of element duration does
> not match its type definition: Double content does not match the
> minExclusive facet..
>
> The invalid XML code is
>
> ```xml
> <note default-x="81.65" default-y="-50.00">
> <pitch>
> <step>C</step>
> <octave>4</octave>
> </pitch>
> <duration>0</duration>
> ...
> ```
>
> The value of `<duration>` must always be a positive number; value 0 is
> not allowed. This is just the first of many other notes in this XML
> file that have a zero duration. In other words, this file cannot be
> handled correctly. Perhaps you should try a newer MuseScore version
> and check whether it produces valid XML...
>
>
> Werner
>