PrimeGrid
Please visit donation page to help the project cover running costs for this month

Toggle Menu

Join PrimeGrid

Returning Participants

Community

Leader Boards

Results

Other

drummers-lowrise

Advanced search

Message boards : Number crunching : invalid XML file for team stats

Author Message
ChristianVirtual
Send message
Joined: 23 Aug 17
Posts: 3
ID: 918303
Credit: 123,324,003
RAC: 0
SoB LLR Amethyst: Earned 1,000,000 credits (1,219,641)PPS Sieve Double Bronze: Earned 100,000,000 credits (122,104,362)
Message 118028 - Posted: 17 May 2018 | 19:53:41 UTC

Dear team,

I got during the Pentathlon challenge frequent updates via WebRPC on the teams; for one team I got this file with an invalid value in the URL; would it be possible for you to format it as "correct" XML or something I need to do my side ?
Reason is that the team used a & in the url killing the XML format.

Thanks
Christian

<?xml version="1.0" encoding="ISO-8859-1" ?>
<team>
<id>2616</id>
<create_time>1282119912</create_time>
<userid>65836</userid>
<name>Crystal Dream</name>
<url>forum.boinc.ru/default.aspx?g=topics&f=31</url>
<type>1</type>
<country>Russia</country>
<total_credit>669468186.1394461</total_credit>
<expavg_credit>555623.88563686</expavg_credit>
<expavg_time>1526581622</expavg_time>
</team>

Profile Michael GoetzProject donor
Volunteer moderator
Project administrator
Avatar
Send message
Joined: 21 Jan 10
Posts: 13625
ID: 53948
Credit: 273,060,698
RAC: 255,504
The "Shut up already!" badge:  This loud mouth has mansplained on the forums over 10 thousand times!  Sheesh!!!Discovered the World's First GFN-19 prime!!!Discovered 1 mega primeFound 1 prime in the 2018 Tour de PrimesFound 1 prime in the 2019 Tour de PrimesFound 1 prime in the 2020 Tour de PrimesFound 2 primes in the 2021 Tour de Primes321 LLR Turquoise: Earned 5,000,000 credits (5,117,081)Cullen LLR Ruby: Earned 2,000,000 credits (3,624,591)ESP LLR Turquoise: Earned 5,000,000 credits (5,021,269)Generalized Cullen/Woodall LLR Ruby: Earned 2,000,000 credits (2,145,754)PPS LLR Sapphire: Earned 20,000,000 credits (20,751,038)PSP LLR Turquoise: Earned 5,000,000 credits (5,197,957)SoB LLR Sapphire: Earned 20,000,000 credits (36,067,618)SR5 LLR Jade: Earned 10,000,000 credits (10,007,110)SGS LLR Ruby: Earned 2,000,000 credits (3,718,606)TRP LLR Turquoise: Earned 5,000,000 credits (5,084,329)Woodall LLR Ruby: Earned 2,000,000 credits (2,963,361)321 Sieve (suspended) Jade: Earned 10,000,000 credits (10,061,196)Cullen/Woodall Sieve (suspended) Ruby: Earned 2,000,000 credits (4,170,256)Generalized Cullen/Woodall Sieve (suspended) Turquoise: Earned 5,000,000 credits (5,059,304)PPS Sieve Sapphire: Earned 20,000,000 credits (22,885,121)Sierpinski (ESP/PSP/SoB) Sieve (suspended) Amethyst: Earned 1,000,000 credits (1,035,522)TRP Sieve (suspended) Ruby: Earned 2,000,000 credits (2,051,121)AP 26/27 Jade: Earned 10,000,000 credits (10,118,303)WW Sapphire: Earned 20,000,000 credits (27,632,000)GFN Emerald: Earned 50,000,000 credits (77,916,132)PSA Jade: Earned 10,000,000 credits (12,445,029)
Message 118030 - Posted: 17 May 2018 | 20:44:54 UTC - in response to Message 118028.

What is the URL you are using for the query?

Also, what do you expect to be the "correct" output here? Are you saying the "&" should be "&amp;"?
____________
My lucky number is 75898524288+1

ChristianVirtual
Send message
Joined: 23 Aug 17
Posts: 3
ID: 918303
Credit: 123,324,003
RAC: 0
SoB LLR Amethyst: Earned 1,000,000 credits (1,219,641)PPS Sieve Double Bronze: Earned 100,000,000 credits (122,104,362)
Message 118031 - Posted: 17 May 2018 | 21:57:38 UTC - in response to Message 118030.


My python script hiccup here

Traceback (most recent call last):
File "boinc_import_stats.py", line 299, in <module>
xml = untangle.parse(fn)
File "/usr/lib/python2.7/site-packages/untangle.py", line 177, in parse
parser.parse(filename)
File "/usr/lib64/python2.7/xml/sax/expatreader.py", line 107, in parse
xmlreader.IncrementalParser.parse(self, source)
File "/usr/lib64/python2.7/xml/sax/xmlreader.py", line 123, in parse
self.feed(buffer)
File "/usr/lib64/python2.7/xml/sax/expatreader.py", line 214, in feed
self._err_handler.fatalError(exc)
File "/usr/lib64/python2.7/xml/sax/handler.py", line 38, in fatalError
raise exception
xml.sax._exceptions.SAXParseException: primegrid.com/intraday/2616/T20180517_2100.xml:7:47: not well-formed (invalid token)


As per Google fu it tells me that what you suggested: &amp;

The url I use is the equivalent of project/team_lookup.php for PG (url/script works for other teams and projects; but will check more after pent is over)

Profile Michael GoetzProject donor
Volunteer moderator
Project administrator
Avatar
Send message
Joined: 21 Jan 10
Posts: 13625
ID: 53948
Credit: 273,060,698
RAC: 255,504
The "Shut up already!" badge:  This loud mouth has mansplained on the forums over 10 thousand times!  Sheesh!!!Discovered the World's First GFN-19 prime!!!Discovered 1 mega primeFound 1 prime in the 2018 Tour de PrimesFound 1 prime in the 2019 Tour de PrimesFound 1 prime in the 2020 Tour de PrimesFound 2 primes in the 2021 Tour de Primes321 LLR Turquoise: Earned 5,000,000 credits (5,117,081)Cullen LLR Ruby: Earned 2,000,000 credits (3,624,591)ESP LLR Turquoise: Earned 5,000,000 credits (5,021,269)Generalized Cullen/Woodall LLR Ruby: Earned 2,000,000 credits (2,145,754)PPS LLR Sapphire: Earned 20,000,000 credits (20,751,038)PSP LLR Turquoise: Earned 5,000,000 credits (5,197,957)SoB LLR Sapphire: Earned 20,000,000 credits (36,067,618)SR5 LLR Jade: Earned 10,000,000 credits (10,007,110)SGS LLR Ruby: Earned 2,000,000 credits (3,718,606)TRP LLR Turquoise: Earned 5,000,000 credits (5,084,329)Woodall LLR Ruby: Earned 2,000,000 credits (2,963,361)321 Sieve (suspended) Jade: Earned 10,000,000 credits (10,061,196)Cullen/Woodall Sieve (suspended) Ruby: Earned 2,000,000 credits (4,170,256)Generalized Cullen/Woodall Sieve (suspended) Turquoise: Earned 5,000,000 credits (5,059,304)PPS Sieve Sapphire: Earned 20,000,000 credits (22,885,121)Sierpinski (ESP/PSP/SoB) Sieve (suspended) Amethyst: Earned 1,000,000 credits (1,035,522)TRP Sieve (suspended) Ruby: Earned 2,000,000 credits (2,051,121)AP 26/27 Jade: Earned 10,000,000 credits (10,118,303)WW Sapphire: Earned 20,000,000 credits (27,632,000)GFN Emerald: Earned 50,000,000 credits (77,916,132)PSA Jade: Earned 10,000,000 credits (12,445,029)
Message 118032 - Posted: 17 May 2018 | 22:51:48 UTC - in response to Message 118031.
Last modified: 17 May 2018 | 22:54:04 UTC

The url I use is the equivalent of project/team_lookup.php for PG (url/script works for other teams and projects; but will check more after pent is over)



I need the exact URL that's returning the malformed XML.
____________
My lucky number is 75898524288+1

dukebg
Volunteer tester
Avatar
Send message
Joined: 21 Nov 17
Posts: 240
ID: 950482
Credit: 23,670,125
RAC: 0
Found 1 prime in the 2018 Tour de Primes321 LLR Gold: Earned 500,000 credits (506,942)Cullen LLR Gold: Earned 500,000 credits (500,523)ESP LLR Gold: Earned 500,000 credits (655,642)Generalized Cullen/Woodall LLR Gold: Earned 500,000 credits (539,100)PPS LLR Gold: Earned 500,000 credits (688,232)PSP LLR Gold: Earned 500,000 credits (561,629)SoB LLR Ruby: Earned 2,000,000 credits (3,659,676)SR5 LLR Gold: Earned 500,000 credits (505,810)SGS LLR Gold: Earned 500,000 credits (506,024)TRP LLR Gold: Earned 500,000 credits (963,625)Woodall LLR Gold: Earned 500,000 credits (506,044)321 Sieve (suspended) Gold: Earned 500,000 credits (511,694)Generalized Cullen/Woodall Sieve (suspended) Gold: Earned 500,000 credits (549,916)PPS Sieve Gold: Earned 500,000 credits (701,168)AP 26/27 Gold: Earned 500,000 credits (525,590)WW Gold: Earned 500,000 credits (500,000)GFN Jade: Earned 10,000,000 credits (10,762,872)PSA Gold: Earned 500,000 credits (525,639)
Message 118038 - Posted: 18 May 2018 | 8:17:30 UTC

(just wedging in with valid XML knowledge: & should be &amp; > should be &gt; < should be &lt; and " should be &quot;
all of it will be dealt with by sticking the string through htmlentities() in PHP. it's recomended over urlencode())

ChristianVirtual
Send message
Joined: 23 Aug 17
Posts: 3
ID: 918303
Credit: 123,324,003
RAC: 0
SoB LLR Amethyst: Earned 1,000,000 credits (1,219,641)PPS Sieve Double Bronze: Earned 100,000,000 credits (122,104,362)
Message 118042 - Posted: 18 May 2018 | 11:26:14 UTC

Sorry, had to come first home to get access to the system:

when entering this command on linux
curl http://www.primegrid.com/team_lookup.php?team_id=2616

I get this ...

<?xml version="1.0" encoding="ISO-8859-1" ?>
<team>
<id>2616</id>
<create_time>1282119912</create_time>
<userid>65836</userid>
<name>Crystal Dream</name>
<url>forum.boinc.ru/default.aspx?g=topics&amp;f=31</url>
<type>1</type>
<country>Russia</country>
<total_credit>670658404.0840681</total_credit>
<expavg_credit>632668.65609502</expavg_credit>
<expavg_time>1526639162</expavg_time>
</team>

Thanks for fixing !

Message boards : Number crunching : invalid XML file for team stats

[Return to PrimeGrid main page]
DNS Powered by DNSEXIT.COM
Copyright © 2005 - 2021 Rytis Slatkevičius (contact) and PrimeGrid community. Server load 3.90, 3.14, 3.50
Generated 11 May 2021 | 11:35:29 UTC