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

Splatalogue.query_lines() seems to be broken? #3024

Closed
kmhess opened this issue Jun 6, 2024 · 2 comments
Closed

Splatalogue.query_lines() seems to be broken? #3024

kmhess opened this issue Jun 6, 2024 · 2 comments

Comments

@kmhess
Copy link

kmhess commented Jun 6, 2024

I'm attempting to figure out how to use splatalogue in astroquery, and it seems like it's broken? Below is the most basic search, but the error I get seems to be that astroquery(?) can't parse the url or the table that is returned from the url? I get the exact same error if I use the find_lines() tool in SpectralCube (e.g. https://learn.astropy.org/tutorials/SpectralCubeReprojectExample.html).

---------------------------------------------------------------------------
InconsistentTableError                    Traceback (most recent call last)
<ipython-input-22-c820df52897a> in <module>
----> 1 co = Splatalogue.query_lines(114*u.GHz,116*u.GHz,chemical_name=' CO ')

~/SoFiA-image-pipeline/test_install/lib/python3.9/site-packages/astroquery/utils/class_or_instance.py in f(*args, **kwds)
     23         def f(*args, **kwds):
     24             if obj is not None:
---> 25                 return self.fn(obj, *args, **kwds)
     26             else:
     27                 return self.fn(cls, *args, **kwds)

~/SoFiA-image-pipeline/test_install/lib/python3.9/site-packages/astroquery/utils/process_asyncs.py in newmethod(self, *args, **kwargs)
     27             if kwargs.get('get_query_payload') or kwargs.get('field_help'):
     28                 return response
---> 29             result = self._parse_result(response, verbose=verbose)
     30             self.table = result
     31             return result
...
...
...
~/SoFiA-image-pipeline/test_install/lib/python3.9/site-packages/astropy/io/ascii/core.py in read(self, table)
   1447                     )
   1448 
-> 1449                     raise InconsistentTableError(errmsg)
   1450 
   1451             for j, col in enumerate(cols):

InconsistentTableError: Number of header columns (1) inconsistent with data columns (2) at data line 13
Header values: ['<!-- start of nrao-header.html -->']
Data values: ['<a href="http', '//www.nrao.edu/">']
@keflavich
Copy link
Contributor

This was fixed in #2960. Could you please try updating astroquery to the latest dev version and try again?

@kmhess
Copy link
Author

kmhess commented Jun 9, 2024

That works, thanks so much. Sorry for not finding that before.

@kmhess kmhess closed this as completed Jun 9, 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