hmm, it seems that the problem is a python related one... i'll summarize soon

On 12/28/11 08:59 AM, Gerard Henry wrote:
unfortunately, same error
 >>> xml = ET.parse(stdout)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib64/python2.6/xml/etree/ElementTree.py", line 862, in parse
tree.parse(source, parser)
File "/usr/lib64/python2.6/xml/etree/ElementTree.py", line 579, in parse
source = open(source, "rb")
IOError: [Errno 2] No such file or directory: '<?xml
version=\'1.0\'?>\n<job_info
xmlns:xsd="http://gridscheduler.svn.sourceforge.net/viewvc/gridscheduler/trunk/source/dist/util/resources/schemas/qstat/qstat.xsd?revision=11";>\n
<queue_info>\n </queue_info>\n <job_info>\n </job_info>\n</job_info>\n'

or if i specify the jobid in qstat args, there is:
IOError: [Errno 36] File name too long: '<?xml
version=\'1.0\'?>\n<detailed_job_info
xmlns:xsd="http://gridscheduler.svn.sourceforge.net/viewvc/gridscheduler/trunk/source/dist/util/resources/schemas/qstat/qstat.xsd?revision=11";>\n
<djob_info>\n <element>\n <JB_job_number>14556</JB_job_number>\n
<JB_ar>0</JB_ar>\n <JB_exec_file>job_scripts/14556</JB_exec_file>\n
<JB_submission_time>1325057543</JB_submission_time>\n
<JB_owner>webservd</JB_owner>\n
...

as i understand (if i understand well), the xsd is not taken into
account par the ElementTree lib, ii's just a lib to parse a file without
trying to validate it.
And the strange thing is that <job_info>, which is the root of the
document, is repeated at the end of the generated xml, is it normal?


On 12/28/11 07:32 AM, Rayson Ho wrote:
Can you take the "qstat" binary from the GE2011.11 release and run it
with your parser??

http://dl.dropbox.com/u/47200624/ge2011.11-x64.tar.gz

I think the problem is due to the
"http://gridengine.sunsource.net/source/browse/*checkout*/gridengine/source/dist/util/resources/schemas/qstat/qstat.xsd?revision=1.11";

link, which is now gone (the GE2011.11 release points the URL to a
valid location).

Rayson


On Wed, Dec 28, 2011 at 1:12 AM, Gerard Henry<[email protected]>
wrote:
hello all,
i am trying to use xml output of qstat for a web app, but i'm having
troubles with parsers.
The idea is to use python and the ElementTRee library, but it fails
and i
don't understand why. Perhaps, anybody can test the following code on
their
machines?

http://pastebin.ca/2096726

the code was tested on macosx, solaris and linux.

Thanks in advance for help,

gerard
_______________________________________________
users mailing list
[email protected]
https://gridengine.org/mailman/listinfo/users

_______________________________________________
users mailing list
[email protected]
https://gridengine.org/mailman/listinfo/users

_______________________________________________
users mailing list
[email protected]
https://gridengine.org/mailman/listinfo/users

Reply via email to