qstat/xml parser bug
Occasionally, the returns from 'qstat -xf' are not really in XML. Queue.qstat() was designed to catch an XML/parser exception, but unfortunately, the specified exception type had been wrong. This could lead to an error like this:
20230110-203702: agent pid: 16117 job id:392674 name:13A_537__calibration__PPR : done
multiprocessing.pool.RemoteTraceback:
"""python
Traceback (most recent call last):
File "/lustre/cv/users/rxue/sw/mambaforge/lib/python3.9/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/lustre/cv/users/rxue/sw/mambaforge/lib/python3.9/multiprocessing/pool.py", line 48, in mapstar
return list(map(*args))
File "/users/rxue/Library/Pipeline/plutils/examples/scripts/rt-scheduler.py", line 96, in qsub_test
current_jobs = q.qstat()
File "/users/rxue/Library/Pipeline/plutils/plutils/helper/queue.py", line 110, in qstat
qstat_dict = xmltodict.parse(qstat_xml)
File "/lustre/cv/users/rxue/sw/mambaforge/lib/python3.9/site-packages/xmltodict.py", line 378, in parse
parser.Parse(xml_input, True)
xml.parsers.expat.ExpatError: syntax error: line 1, column 0
"""
The bug has been corrected in df0afa11.
Hi @kberry, this might be relevant to you.