开云体育

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:

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

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

Added screen shot below
/g/jmriusers/photo/246752/0?p=Created,,,20,2,0,0
_._,_._,_
--
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).

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:
>
> Added screen shot below
> /g/jmriusers/photo/246752/0?p=Created,,,20,2,0,0
> _._,_._,_

--
Bob Jacobsen
rgj1927@...







 

开云体育

James and Bob,

On 12 May 2020, at 12:19 AM, Jamos Bond <jambri@...> wrote:

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

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.

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:

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

On 12 May 2020, at 9:45 AM, Dave Heap via <dgheap@...> wrote:

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.

Thanks for finding this. A fix is in the works at?.

Dave in Australia


 
Edited

Ok tell me when u have it I will update

On Tue, May 12, 2020, 2:12 AM Dave Heap <dgheap@...> wrote:

James,
?
?

On 12 May 2020, at 9:45 AM, Dave Heap via <dgheap@...> wrote:

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.

Thanks for finding this. A fix is in the works at?.
?
Dave in Australia
?

?

?


 
Edited

James,
?
On 12 May 2020, at 9:59 PM, Jamos Bond <jambri@...> wrote:

Ok tell me when u have it I will update

The fix will be in V4.19.7 but I'd recommend you try a developer build to make sure it really is fixed:
<>
?
Dave in Australia
?