¿ªÔÆÌåÓý

Locked How to fix a "Parse error" when loading Panel Pro panel #layouteditor


 

I am getting a Parse Error message when trying to load my Panel Pro panel (I use Layout Editor; JMRI 5.2; Windows10; Java 11.0.17). It loads the panel file but the signals on the panel aren't reacting when I close or throw a turnout. I went to the JMRI Parse error help page but the solutions are beyond my knowledge level. One of the solutions instructs to, "Seek assistance on the JMRI User's Group." (see below)
?
The actual error message follows, indicating that "Content is not allowed in prolog."
?
Requesting help on how to rectify this.
Thanks,
John P.
?
?
?
Parse error
The XML file is not readable for some reason. This can be for one of two reasons:
  1. The file is not valid XML. This could be the result of editing the file to fix another error, or it's being truncated by another process. Seek assistance on the JMRI User's Group.
  2. The file does not conform to the XML schema JMRI requires file to conform to. Specific schema validations and the recommended remediation are:
    Error Remediation
    Attribute "error" must be declared for element type "sensoricon"
    1. Remove the text?<!DOCTYPE layout-config SYSTEM "layout-config.dtd">
    2. Replace?<layout-config>?with?<layout-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://jmri.org/xml/schema/layout.xsd">.
    cvc-pattern-valid: Value 'resource:something' is not facet-valid with respect to pattern '(program:|preference:|settings:|home:|profile:|file:|http:|[a-zA-Z]:)[a-z A-Z0-9/\-_\.]*' for type 'urlType'. Replace all instances of?resource:?in the XML file with?program:


 

John,

You need to upload the file to the group's ProblemsBeingWorkedOn file folder.

Dave Sand


----- Original message -----
From: John Poray <johnporay@...>
Subject: [jmriusers] How to fix a "Parse error" when loading Panel Pro panel
Date: Thursday, October 03, 2024 3:47 PM

I am getting a Parse Error message when trying to load my Panel Pro panel (I use Layout Editor; JMRI 5.2; Windows10; Java 11.0.17). It loads the panel file but the signals on the panel aren't reacting when I close or throw a turnout. I went to the JMRI Parse error help page but the solutions are beyond my knowledge level. One of the solutions instructs to, "Seek assistance on the JMRI User's Group." (see below)
?
The actual error message follows, indicating that "Content is not allowed in prolog."
?
Requesting help on how to rectify this.
Thanks,
John P.

?
?
?
Parse error
The XML file is not readable for some reason. This can be for one of two reasons:
  1. The file is not valid XML. This could be the result of editing the file to fix another error, or it's being truncated by another process. Seek assistance on the JMRI User's Group.
  2. The file does not conform to the XML schema JMRI requires file to conform to. Specific schema validations and the recommended remediation are:
    Error
    Remediation
    Attribute "error" must be declared for element type "sensoricon"
    1. Remove the text?<!DOCTYPE layout-config SYSTEM "layout-config.dtd">
    2. Replace?<layout-config>?with?<layout-config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://jmri.org/xml/schema/layout.xsd">.
    cvc-pattern-valid: Value 'resource:something' is not facet-valid with respect to pattern '(program:|preference:|settings:|home:|profile:|file:|http:|[a-zA-Z]:)[a-z A-Z0-9/\-_\.]*' for type 'urlType'.
    Replace all instances of?resource:?in the XML file with?program:


 

John P,

In the debug menu is a command to test a XML file. It will give a
cleaner error about which line caused the issue.

-Ken Cameron, Member JMRI Dev Team
www.jmri.org
www.fingerlakeslivesteamers.org
www.cnymod.com


 

Dave,
I've uploaded the file.
Verify XML identified that the Parse error is in Line 1.?
Thanks,
John


 

John,

I don't see the file.

Dave Sand


----- Original message -----
From: John Poray <johnporay@...>
Subject: Re: [jmriusers] How to fix a "Parse error" when loading Panel Pro panel #layouteditor
Date: Thursday, October 03, 2024 6:13 PM

Dave,
I've uploaded the file.
Verify XML identified that the Parse error is in Line 1.?
Thanks,
John


 

/g/jmriusers/files/ProblemsBeingWorkedOn/DS%20Fix_NYC_JMRI_Railroad_GOOD2-117A-red_AUG24-24.xml

--
Peter Ulvestad

JMRI Users Group Moderator ( )
Tam Valley Group Moderator ( )
Sprog-DCC Group Moderator ( )
Edmonton Model Railroad Association ( )


 

That file is not a valid panel file. It's not an xml file at all. Its contents are:

21:11:42.766: [BB 03 00 47]? Request data/status for slot 3.
21:11:44.902: [BB 03 00 47]? Request data/status for slot 3.
21:12:26.081: [BB 7F 00 3B]? Request Command Station OpSwitches (or DCS210/DCS240 check for multiple command stations on LocoNet).
21:14:31.150: [BB 7F 00 3B]? Request Command Station OpSwitches (or DCS210/DCS240 check for multiple command stations on LocoNet).
21:16:36.223: [BB 7F 00 3B]? Request Command Station OpSwitches (or DCS210/DCS240 check for multiple command stations on LocoNet).
21:18:41.297: [BB 7F 00 3B]? Request Command Station OpSwitches (or DCS210/DCS240 check for multiple command stations on LocoNet).

Daniel


 

Peter,

Thanks. Normally I just need to sort on updated but his time I needed to force a page refresh.

Dave Sand

----- Original message -----
From: Peter Ulvestad <ulvestad@...>
To: [email protected]
Subject: Re: [jmriusers] How to fix a "Parse error" when loading Panel Pro panel #layouteditor
Date: Thursday, October 03, 2024 6:49 PM

/g/jmriusers/files/ProblemsBeingWorkedOn/DS%20Fix_NYC_JMRI_Railroad_GOOD2-117A-red_AUG24-24.xml

--
Peter Ulvestad

JMRI Users Group Moderator ( )
Tam Valley Group Moderator ( )
Sprog-DCC Group Moderator ( )
Edmonton Model Railroad Association ( )


 

John,

You accidentally saved the LocoNet monitor log to the name of the layout xml file.

You will need to use a previous version of the xml file. ?If you normally do a store with replace, a previous version will be in the backupPanels directory.

Dave Sand


----- Original message -----
From: John Poray <johnporay@...>
Subject: Re: [jmriusers] How to fix a "Parse error" when loading Panel Pro panel #layouteditor
Date: Thursday, October 03, 2024 6:13 PM

Dave,
I've uploaded the file.
Verify XML identified that the Parse error is in Line 1.?
Thanks,
John


 

Dave,
Please tell me (again) how to upload a file. Thought?I had done it correctly.?
Thanks,
John

--
John Poray


 

John,

You did it just fine. ?I needed to force a browser page refresh.

Dave Sand


----- Original message -----
From: John Poray <johnporay@...>
Subject: Re: [jmriusers] How to fix a "Parse error" when loading Panel Pro panel
Date: Thursday, October 03, 2024 6:59 PM

Dave,
Please tell me (again) how to upload a file. Thought?I had done it correctly.?
Thanks,
John

--
John Poray


 

Dave,?
The most recent file in the Backup files is dated August 20. I saved 17 versions after that one but none of those appear in the Backup files. Is the August 20 file the only option??
John

--
John Poray


 

John,

By "versions" do you mean with the same file name or a different name? ?The "backupPanels" directory process only occurs when doing a store with the same name.

Looking at some recent downloads, it appears that you change file names frequently. ?These are manual versions.

Dave Sand


----- Original message -----
From: John Poray <johnporay@...>
Subject: Re: [jmriusers] How to fix a "Parse error" when loading Panel Pro panel
Date: Friday, October 04, 2024 9:37 AM

Dave,?
The most recent file in the Backup files is dated August 20. I saved 17 versions after that one but none of those appear in the Backup files. Is the August 20 file the only option??
John

--
John Poray


 

I typically change file addresses every time I do a store. By versions, I am referring to different file names.
John


 

John,

In that case you need to look at your collection of files and find one that works.

The first line of a valid layout data xml file looks like the following.
<?xml version="1.0" encoding="UTF-8"?>

Dave Sand


----- Original message -----
From: John Poray <johnporay@...>
Subject: Re: [jmriusers] How to fix a "Parse error" when loading Panel Pro panel #layouteditor
Date: Friday, October 04, 2024 11:08 AM

I typically change file addresses every time I do a store. By versions, I am referring to different file names.
John


 

When looking at the BackupPanel folder, I don't find any file that has <?xml version="1.0" encoding="UTF-8"?>?
?
Am I looking in the wrong place?
John
?


 

John,

How are you looking at the file content? ?For Windows, NotePad++ is a good xml aware file editor.

Dave Sand


----- Original message -----
From: John Poray <johnporay@...>
Subject: Re: [jmriusers] How to fix a "Parse error" when loading Panel Pro panel #layouteditor
Date: Friday, October 04, 2024 12:32 PM

When looking at the BackupPanel folder, I don't find any file that has <?xml version="1.0" encoding="UTF-8"?>?
?
Am I looking in the wrong place?
John
?


 

I just looked at the "...Aug20-2-24" panel file in Notepad. It does have the <?xml version="1.0" encoding="UTF-8"?> in line 1. What do I do with it next?? Sorry for all the basic questions.? File management has never been a string suit for me.
John


 

John,

Do you have a file loading automatically using a startup action? ?If so, go to "Preferences -> Start Up" and delete it by selecting the action and clicking on the Remove button. ?Click on Save and do a restart.

After starting PanelPro, go to "Help -> File Locations". ?Click on the "Open User Files Location" button. ?This will open the Windows File Manager at the user files location. ?

Is the good file in the File Manager file list? ?If so, you can load it into PanelPro using "File -> Load table content and panels". ?If not, the file needs to be moved from its current location. ?

Dave Sand

----- Original message -----
From: John Poray <johnporay@...>
Subject: Re: [jmriusers] How to fix a "Parse error" when loading Panel Pro panel #layouteditor
Date: Friday, October 04, 2024 2:59 PM

I just looked at the "...Aug20-2-24" panel file in Notepad. It does have the <?xml version="1.0" encoding="UTF-8"?> in line 1. What do I do with it next?? Sorry for all the basic questions.? File management has never been a string suit for me.
John


 

Dave,
I followed your instructions. The "good" panel loaded, however, when clicking on turnouts on the panel to "light up" the signals from all showing a red aspect, only a handful changed to what they should be. I checked the Sensor Table and in the State column, all of them show "Unknown" and won't change when I click on them.
John