mschlenstedt / LoxBerry-Plugin-Stats4Lox-NG

Apache License 2.0
6 stars 3 forks source link

Unable to get any statistics. ERROR: Cannot parse LoxPLAN XML #131

Open ActiveByte opened 1 year ago

ActiveByte commented 1 year ago

When i go to the 'Loxone and import' page i don't get any results after the page has loaded. When i go to the logs i see the following error:

`CRITICAL: import.cgi: Cannot parse LoxPLAN XML file: :3: parser error : error parsing attribute name rea="1" UnitHeight="1" UnitWindSpeed="4" UnitPrecipitation="2" UnitPressure="2" ^ :3: parser error : attributes construct error rea="1" UnitHeight="1" UnitWindSpeed="4" UnitPrecipitation="2" UnitPressure="2" ^ :3: parser error : Couldn't find end of Start Tag C line 3 rea="1" UnitHeight="1" UnitWindSpeed="4" UnitPrecipitation="2" UnitPressure="2" ^ :3180: parser error : Opening and ending tag mismatch: ControlList line 2 and C

^ :3181: parser error : Extra content at the end of the document

^

CRITICAL: Error parsing XML`

ActiveByte commented 1 year ago

I was able to solve this issue by changing my units in Loxone config under the main configuration item in the list.

christianTF commented 1 year ago

Do you still have the uncorrected file for testing? If you send me that file via PM on loxforum.com, or by email christian at loxberry.de, I possibly can automatically fix the xml before handing it over to the xml parser (we do that already for several Loxone non-valid xml parts in our code).

smiley125 commented 1 year ago

I'm having the same issue, with the same error, just wondering how you resolved it?

My error is:

`CRITICAL: import.cgi: Cannot parse LoxPLAN XML file: :3: parser error : error parsing attribute name 6b2b-ffffa3b5cadb2c5f" UnitWindSpeed="4" UnitPrecipitation="1" UnitPressure="1" ^ :3: parser error : attributes construct error 6b2b-ffffa3b5cadb2c5f" UnitWindSpeed="4" UnitPrecipitation="1" UnitPressure="1" ^ :3: parser error : Couldn't find end of Start Tag C line 3 6b2b-ffffa3b5cadb2c5f" UnitWindSpeed="4" UnitPrecipitation="1" UnitPressure="1" ^ :4805: parser error : Opening and ending tag mismatch: ControlList line 0 and C

^ :4806: parser error : Extra content at the end of the document

^`

MephistoJB commented 1 year ago

I think there is another error with parsing LoxPLAN XML

CRITICAL: import.cgi: Cannot parse LoxPLAN XML file: :335: parser error : Attribute Phn redefined UsRnA="1664" iBtnArr="" CodeArr="" NFCArr="" NFCNArr="" EAIdArr="" LastEdit="0" ^ :342: parser error : Attribute Phn redefined UsRnA="1664" iBtnArr="" CodeArr="" NFCArr="" NFCNArr="" EAIdArr="" LastEdit="0" ^ :346: parser error : Attribute Phn redefined UsRnA="1024" iBtnArr="" CodeArr="" NFCArr="" NFCNArr="" EAIdArr="" LastEdit="0" ^ :350: parser error : Attribute Phn redefined 1664" iBtnArr="" CodeArr="" NFCArr="" NFCNArr="" EAIdArr="" LastEdit="418248774" ^

CRITICAL: Error parsing XML

MephistoJB commented 1 year ago

Maybe also worth mentioning that I use Loxone Config Version 14.3.8.3 and a Miniserver Gen. 1

mr-manuel commented 1 year ago

Is this maybe something similar to https://github.com/mschlenstedt/LoxBerry-Plugin-Stats4Lox-NG/issues/139? I'm also using a Miniserver Gen. 1 and was using 14.3.8.3, now 14.4.8.9, but no issues with that. If you search that lines in the *.Loxone file, what is the whole block?

MephistoJB commented 1 year ago

yes, this is exactly the same. I followed the guidance in the forum and it fixed it. But I had to do this manually. Does this come in the next version?

Oh and thanks

mr-manuel commented 1 year ago

I already notified Loxone and they fix it in the next version. Please close this issue :-)

MephistoJB commented 1 year ago

You sure? @christianTF reopened it on purpose in January

smiley125 commented 1 year ago

yes, this is exactly the same. I followed the guidance in the forum and it fixed it. But I had to do this manually. Does this come in the next version?

Oh and thanks

Can you link the guidance? Still struggling with mine.

Thanks

MephistoJB commented 1 year ago

https://www.loxforum.com/forum/projektforen/loxberry/plugins/315626-stats4lox-das-statistik-plugin?p=400051#post400051

But its german :)

christianTF commented 1 year ago

Michael has commited another workaround for an issue in Loxone‘s XML, please update the plugin to the current master. This may fix it. If not, we need the full line of the Loxone XML that fails, as the error message in the log does not display the block type where it happens.