astropy / astroquery

Functions and classes to access online data resources. Maintainers: @keflavich and @bsipocz and @ceb8
http://astroquery.readthedocs.org/en/latest/
BSD 3-Clause "New" or "Revised" License
706 stars 399 forks source link

SimbadClass got an unexpected keyword argument #3072

Closed mbbadaracco closed 3 months ago

mbbadaracco commented 4 months ago

Hello everyone

I'm trying to run the example script from the docs:

from astroquery.simbad import Simbad

simbad = Simbad()
simbad.ROW_LIMIT = 5
simbad.query_bibcode("2016PhRvL.*", wildcard=True, criteria="title LIKE '%gravitational wave%coalescence.'") 

and I get this error:

TypeError Traceback (most recent call last) Cell In[10], line 7 3 simbad = Simbad() 5 simbad.ROW_LIMIT = 5 ----> 7 simbad.query_bibcode("2016PhRvL.*", wildcard=True, 8 9 criteria={"title LIKE '%gravitational wave%coalescence.'"})

TypeError: SimbadClass.query_bibcode() got an unexpected keyword argument 'criteria'

I get the same error with the keyword 'abstract'. Perhaps the following is useful information: this happens trying to run it in google colab as well as in my OS Ubuntu 22.04.4 LTS; the version of astroquery is 0.4.8.dev9321, and I have all the dependencies installed.

ManonMarchand commented 3 months ago

Hi!

These two arguments are new and they are not in this version. If you want to use them, you'll have to do pip install git+https://github.com/astropy/astroquery.git

@bsipocz : looks like the documentation is a bit ahead of the releases, is it normal?

mbbadaracco commented 3 months ago

Solved! Thank you very much.

bsipocz commented 3 months ago

Yes, the documentation with "latest" in their URL is routinely reflects the dev branch, all around the ecosystem.

bsipocz commented 3 months ago

@ManonMarchand - I've pushed a dev release to pypi, so the docs' recommendation of pip install --pre -U astroquery now picks up a something fresh (including all the recent simbad changes).

ManonMarchand commented 3 months ago

Thanks! I'll keep an eye for questions and/or possible bug reports. Fingers crossed the transition will be smooth for everyone.