[AstroPy] problem with vo.table reading SkyBoT xml file

Jerome Caron jerome_caron_astro at ymail.com
Sat Dec 17 02:54:10 EST 2011


Dear list
 
I try to use the SkyBoT service to retrieve asteroid positions, but I have some difficulties to read the VOtable with the vo.table python module.
SkyBoT is described here
http://vo.imcce.fr/webservices/skybot/?conesearch
 
If I get the file with the following request (search radius - 100 arcmin) and save it under skybot.xmlhttp://vo.imcce.fr/webservices/skybot/skybotconesearch_query.php?-ep=2455911.0&-ra=0.0&-dec=0.0&-rm=100&-mime=votable&-output=object&-loc=500
 
from vo.table import parse_single_table
votable = parse_single_table("skybot.xml", pedantic=False)
 
But if I make a search in a square box
http://vo.imcce.fr/webservices/skybot/skybotconesearch_query.php?-ep=2455911.0&-ra=0.0&-dec=0.0&-bm=100x100&-mime=votable&-output=object&-loc=500
Then the same instruction creates an error. 
Does anyone have an idea ? The syntax of my request seems fine and I got a proper response from SkyBoT.
It looks like there is a problem with vo.table. I am using vo-0.7.2.
 
Thanks for your help
Cheers
Jerome
 
The xml file is attached, and error message is below.
skybot.xml:2:0: W42: No XML namespace specified
skybot.xml:26:0: W06: Invalid UCD 'instr.fov': Secondary word 'instr.fov' is not
 valid as a primary word
skybot.xml:26:0: W30: Invalid literal for float '6000x6000'.  Treating as empty.
Traceback (most recent call last):
  File "C:\Documents and Settings\jerome caron\Desktop\test.py", line 10, in <mo
dule>
    votable = parse_single_table("skybot.xml", pedantic=False)
  File "C:\Python26\lib\site-packages\vo\table.py", line 117, in parse_single_ta
ble
    votable = parse(source, **kwargs)
  File "C:\Python26\lib\site-packages\vo\table.py", line 103, in parse
    return tree.VOTableFile(config=config, pos=(1, 1)).parse(iterator, config)
  File "C:\Python26\lib\site-packages\vo\tree.py", line 2872, in parse
    iterator, tag, data, config, pos)
  File "C:\Python26\lib\site-packages\vo\tree.py", line 2810, in _add_resource
    resource.parse(self, iterator, config)
  File "C:\Python26\lib\site-packages\vo\tree.py", line 2654, in parse
    tag_mapping.get(tag, self._add_unknown_tag)(iterator, tag, data, config, pos
)
  File "C:\Python26\lib\site-packages\vo\tree.py", line 2622, in _add_param
    param.parse(iterator, config)
  File "C:\Python26\lib\site-packages\vo\tree.py", line 1134, in parse
    self._setup(config, pos)
  File "C:\Python26\lib\site-packages\vo\tree.py", line 1187, in _setup
    self.value = self._value
  File "C:\Python26\lib\site-packages\vo\tree.py", line 1173, in _set_value
    vo_raise(E14, (), self._config, self._pos)
  File "C:\Python26\lib\site-packages\vo\voexceptions.py", line 79, in vo_raise
    raise exception_class(args, config, pos)
vo.voexceptions.E14: skybot.xml:26:0: E14: value attribute is required for all P
ARAM elements
Press any key to continue . . .Then I can read it with the following code
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20111217/e4a7f058/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: skybot.xml
Type: application/octet-stream
Size: 63173 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/astropy/attachments/20111217/e4a7f058/attachment.obj>


More information about the AstroPy mailing list