Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
Search
Locked Error on XML File should I be concerned?
Now this was read in from my ESU programming track.
</locomotive> ? ? <locomotive id="EMD SW1200 IT" fileName="EMD_SW1200_IT.xml" roadNumber="1202" roadName="Illinois Terminal" mfg="WALTHERS PROTO" owner="JJB" model="EMD SW1200 IT 1202" dccAddress="3200" comment="" maxSpeed="100" imageFilePath="preference:roster/EMD SW1200 IT.jpg" iconFilePath="preference:roster/1-EMD SW1200 IT.jpg" URL="" IsShuntingOn="">
? ? ? <dateUpdated>2020-05-11T01:18:35.363+0000</dateUpdated>
? ? ? <decoder model="LokSound 5 micro DCC" family="ESU LokSound 5" comment="" />
? ? ? <locoaddress>
? ? ? ? <dcclocoaddress number="3200" longaddress="yes" />
? ? ? ? <number>3200</number>
? ? ? ? <protocol>dcc_long</protocol>
? ? ? </locoaddress>
? ? ? <functionlabels>
? ? ? ? <functionlabel num="0" lockable="true" functionImage="" functionImageSelected="">Light</functionlabel>
? ? ? ? <functionlabel num="1" lockable="true" functionImage="" functionImageSelected="">Bell</functionlabel>
? ? ? ? <functionlabel num="2" lockable="false" functionImage="" functionImageSelected="">Horn</functionlabel>
? ? ? </functionlabels>
? ? ? <soundlabels>
? ? ? ? <soundlabel num="33">Automatic brake sound</soundlabel>
? ? ? ? <soundlabel num="34">Gear shift sound</soundlabel>
? ? ? </soundlabels>
? ? </locomotive> error is on soundlablel num 33 i do not see why its throwing a sql validaion errors? Should I read this with my NCE controller and see if I get same error? James |
What did the error say?
Bob On May 11, 2020, at 5:22 AM, Jamos Bond <jambri@...> wrote:-- Bob Jacobsen rgj1927@... |
Thanks. It’s saying that the num field in the sound label description can only go to 28, and it found 33 (not a particularly clear message though).
That check happens as the file is read, before the rest of the code processes it. If 33 is actually something that the rest of the code can handle, you can run the jython/TurnOffXmlValidation.py script in the JMRI startup options. That’ll turn off this check. I don’t know whether that 33 value will cause downstream problems, though. Bob On May 11, 2020, at 6:50 AM, Jamos Bond <jambri@...> wrote:-- Bob Jacobsen rgj1927@... |
I'm worried if I upgrade jmri with that error I would get a blank roster due to that error. Can't I just modify the XML file to remove that entry? On Mon, May 11, 2020, 10:16 AM Bob Jacobsen <rgj1927@...> wrote: Thanks.? It’s saying that the num field in the sound label description can only go to 28, and it found 33? (not a particularly clear message though). |
开云体育James and Bob,
I'm not seeing this problem at all with HEAD of Master. Sound Labels 33 and 34 are valid in the code, needed for the decoder definition and are loading fine for me. I can't see where the schema error is happening. James, what version on JMRI do you have? Dave in Australia |
Bob,
On 12 May 2020, at 9:00 AM, Dave Heap via groups.io <dgheap@...> wrote:Found the problem: In 2019 I changed functionLabels and soundlabels from fixed-length arrays to HashMaps to allow for planned expansions. But I forgot to update "locomotive-config.xsd" to reflect the changes. As a result, direct XML validation of roster.xml will fail if any ESU Generation 5 decoders are in the current roster. But everything works fine. I'll push through a fix. Dave in Australia |
开云体育James, In 2019 I changed functionLabels and soundlabels from fixed-length arrays to HashMaps to allow for planned expansions. But I forgot to update "locomotive-config.xsd" to reflect the changes. Thanks for finding this. A fix is in the works at?. Dave in Australia |
toggle quoted message
Show quoted text
|
to navigate to use esc to dismiss