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

TST BUG: cdms mocked example raises EmptyResponseError #3007

Open
bsipocz opened this issue May 9, 2024 · 0 comments
Open

TST BUG: cdms mocked example raises EmptyResponseError #3007

bsipocz opened this issue May 9, 2024 · 0 comments

Comments

@bsipocz
Copy link
Member

bsipocz commented May 9, 2024

There is a weird thing with the tests, that if one runs the patched example, it returns an EmptyResponseError. I wonder if we could use examples, even for the local tests that should work when actually querying the server?

>>> from astroquery.linelists.cdms import CDMS
>>> from astropy import units as u
>>> tbl = CDMS.query_lines(min_frequency=100 * u.GHz,
...                                max_frequency=1000 * u.GHz,
...                                min_strength=-500,
...                                molecule="CO")
EmptyResponseError                        Traceback (most recent call last)
Cell In[1], line 3
      1 from astroquery.linelists.cdms import CDMS
      2 from astropy import units as u
----> 3 tbl = CDMS.query_lines(min_frequency=100 * u.GHz,
      4                                max_frequency=1000 * u.GHz,
      5                                min_strength=-500,
      6                                molecule="CO")

File ~/munka/devel/astroquery/astroquery/utils/class_or_instance.py:25, in class_or_instance.__get__.<locals>.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)

File ~/munka/devel/astroquery/astroquery/utils/process_asyncs.py:26, in async_to_sync.<locals>.create_method.<locals>.newmethod(self, *args, **kwargs)
     22 @class_or_instance
     23 def newmethod(self, *args, **kwargs):
     24     verbose = kwargs.pop('verbose', False)
---> 26     response = getattr(self, async_method_name)(*args, **kwargs)
     27     if kwargs.get('get_query_payload') or kwargs.get('field_help'):
     28         return response

File ~/munka/devel/astroquery/astroquery/linelists/cdms/core.py:165, in CDMSClass.query_lines_async(self, min_frequency, max_frequency, min_strength, molecule, temperature_for_intensity, flags, parse_name_locally, get_query_payload, cache)
    163         break
    164 if not ok:
--> 165     raise EmptyResponseError("Did not find table in response")
    167 baseurl = self.URL.split('cgi-bin')[0]
    168 fullurl = f'{baseurl}/{url}'

EmptyResponseError: Did not find table in response

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

1 participant