[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: musicxml2ly fails on line 824 -> dirty fix
From: |
Werner LEMBERG |
Subject: |
Re: musicxml2ly fails on line 824 -> dirty fix |
Date: |
Tue, 16 Jul 2024 08:13:33 +0000 (UTC) |
> 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
- Re: musicxml2ly fails on line 824 -> dirty fix,
Werner LEMBERG <=