You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original motivation:
This has been moved over from astroquery as I was running into pyvo limitations while I tried to address this problem. The issue I tried to address is to run a caom query to list all the possible collection values for an SIA query. The query, leaving the default return format, is expected to take long, but we do have some formats cached on server side (ipac table, HTML, and json at the time it came up). So the easy solution would have been to pass on the FORMAT keyword.
However, the pyvo machinery is not at all prepared for that, even though we have e.g. execute_raw() method to compliment execute_votable(), the mixin inheritances later on still assume to receive votables.
(e.g. TAPResults is eventually inherited from AdhocServiceResultsMixin that assumes votable inputs, etc. At that point I stopped investigating further and will ask on our server side to keep caching the default votable result, too.
However, I think it would be nice to eventually support other formats, even if it only means dumping the text stream back to the user without doing any parsing of it. (That was my intention before running into this multi-generation inheritance)
query = "SELECT DISTINCT collection from caom.observation ORDER by collection"
format = 'IPAC_TABLE'
result = Irsa.query_tap(query=query, format=format)
Traceback (most recent call last):
File "/Users/bsipocz/.pyenv/versions/3.11.0/lib/python3.11/site-packages/IPython/core/interactiveshell.py", line 3433, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-7-141065291541>", line 3, in <module>
result = Irsa.query_tap(query=query, format=format)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/bsipocz/munka/devel/astroquery/astroquery/ipac/irsa/core.py", line 85, in query_tap
return self.tap.search(query, language='ADQL', format=format, maxrec=maxrec)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/bsipocz/munka/devel/pyvo/pyvo/dal/tap.py", line 278, in run_sync
**keywords).execute()
^^^^^^^^^
File "/Users/bsipocz/munka/devel/pyvo/pyvo/dal/tap.py", line 1117, in execute
return TAPResults(self.execute_raw(), url=self.queryurl, session=self._session)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/bsipocz/munka/devel/pyvo/pyvo/dal/adhoc.py", line 111, in __init__
super().__init__(votable, url=url, session=session)
File "/Users/bsipocz/munka/devel/pyvo/pyvo/dal/query.py", line 334, in __init__
self._status = self._findstatus(votable)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/bsipocz/munka/devel/pyvo/pyvo/dal/query.py", line 376, in _findstatus
res = self._findresultsresource(votable)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/bsipocz/munka/devel/pyvo/pyvo/dal/query.py", line 365, in _findresultsresource
if len(votable.resources) < 1:
^^^^^^^^^^^^^^^^^
AttributeError: 'TAPQuery' object has no attribute 'resources'
This may need to be propagated upstream into pyvo as irsa_tap.search(query, language='ADQL', format='html') triggers a DALFormatError: E19: None:2:0: E19: File does not appear to be a VOTABLE
Original motivation:
This has been moved over from astroquery as I was running into pyvo limitations while I tried to address this problem. The issue I tried to address is to run a caom query to list all the possible
collection
values for an SIA query. The query, leaving the default return format, is expected to take long, but we do have some formats cached on server side (ipac table, HTML, and json at the time it came up). So the easy solution would have been to pass on theFORMAT
keyword.However, the pyvo machinery is not at all prepared for that, even though we have e.g.
execute_raw()
method to complimentexecute_votable()
, the mixin inheritances later on still assume to receive votables.(e.g.
TAPResults
is eventually inherited fromAdhocServiceResultsMixin
that assumes votable inputs, etc. At that point I stopped investigating further and will ask on our server side to keep caching the default votable result, too.However, I think it would be nice to eventually support other formats, even if it only means dumping the text stream back to the user without doing any parsing of it. (That was my intention before running into this multi-generation inheritance)
See here:
https://irsa.ipac.caltech.edu/docs/program_interface/TAP.html
(this will be needed to address astropy/astroquery#2940 )
The text was updated successfully, but these errors were encountered: