Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: Constant columns fail over tap #40

Closed
olebole opened this issue Apr 12, 2019 · 1 comment
Closed

BUG: Constant columns fail over tap #40

olebole opened this issue Apr 12, 2019 · 1 comment

Comments

@olebole
Copy link
Member

olebole commented Apr 12, 2019

When I do a query that includes a constant column, the answer fails:

>>> import pyvo
>>> s = pyvo.dal.TAPService('https://www.plate-archive.org/tap')
>>> s.run_sync("SELECT TOP 5 plate_id, 'col2' from applause_dr3.process;")
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pyvo/dal/query.py", line 248, in execute_votable
    return votableparse(self.execute_stream().read)
  File "/usr/lib/python3/dist-packages/astropy/io/votable/table.py", line 137, in parse
    config=config, pos=(1, 1)).parse(iterator, config)
  File "/usr/lib/python3/dist-packages/astropy/io/votable/tree.py", line 3390, in parse
    iterator, tag, data, config, pos)
  File "/usr/lib/python3/dist-packages/astropy/io/votable/tree.py", line 3319, in _add_resource
    resource.parse(self, iterator, config)
  File "/usr/lib/python3/dist-packages/astropy/io/votable/tree.py", line 3141, in parse
    iterator, tag, data, config, pos)
  File "/usr/lib/python3/dist-packages/astropy/io/votable/tree.py", line 3092, in _add_table
    table.parse(iterator, config)
  File "/usr/lib/python3/dist-packages/astropy/io/votable/tree.py", line 2382, in parse
    iterator, colnumbers, fields, config)
  File "/usr/lib/python3/dist-packages/astropy/io/votable/tree.py", line 2467, in _parse_tabledata
    vo_raise(E20, len(fields), config, pos)
  File "/usr/lib/python3/dist-packages/astropy/io/votable/exceptions.py", line 98, in vo_raise
    raise exception_class(args, config, pos)
astropy.io.votable.exceptions.E20: None:18:28: E20: Data has more columns than are defined in the header (1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/pyvo/dal/tap.py", line 194, in run_sync
    **keywords).execute()
  File "/usr/lib/python3/dist-packages/pyvo/dal/tap.py", line 810, in execute
    return TAPResults(self.execute_votable(), url=self.queryurl)
  File "/usr/lib/python3/dist-packages/pyvo/dal/query.py", line 251, in execute_votable
    raise DALFormatError(e, self.queryurl)
pyvo.dal.exceptions.DALFormatError: E20: None:18:28: E20: Data has more columns than are defined in the header (1)
@agy-why agy-why changed the title Constant columns fail over tap BUG: Constant columns fail over tap Jan 3, 2023
@kimakan
Copy link
Contributor

kimakan commented Mar 29, 2024

This doesn't seem to be an issue anymore. It was probably fixed with #207. Please open a new issue if there are still cases where this problem occurs.

@kimakan kimakan closed this as completed Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants