-
-
Couldn't load subscription status.
- Fork 424
Open
Description
Hello,
I have this strange failure in my processing, and I don't know how to debug it (besides monkeypatching a Heasarc._lastcatalog_name=numaster attribute before step 4 :D ). Am I doing something wrong?
Thanks in advance
MWE:
In [1]: from astroquery.heasarc import Heasarc
In [2]: query = f"""SELECT name, obsid, time, ra, dec, public_date, __row
...: FROM public.numaster as cat
...: where
...: contains(point('ICRS',cat.ra,cat.dec),circle('ICRS',83.633,22.0145,0.1))=1
...: and
...: cat.exposure_a > 0 order by cat.time
...: """
...:
In [3]: results = Heasarc.query_tap(query)
...:
In [4]: links = Heasarc.locate_data(results.to_table())
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[4], line 1
----> 1 links = Heasarc.locate_data(results.to_table())
File ~/opt/anaconda3/envs/py311/lib/python3.11/site-packages/astroquery/heasarc/core.py:505, in HeasarcClass.locate_data(self, query_result, catalog_name)
500 raise ValueError('No __row column found in query_result. '
501 'query_result needs to be the output of '
502 'query_region or a subset.')
504 if catalog_name is None:
--> 505 catalog_name = self._last_catalog_name
506 if not (
507 isinstance(catalog_name, str)
508 and catalog_name in self.tap.tables.keys()
509 ):
510 raise ValueError(f'Unknown catalog name: {catalog_name}')
AttributeError: 'HeasarcClass' object has no attribute '_last_catalog_name'