Skip to content

astroquery.ipac.irsa.most fails to import with astroquery v0.4.11 and astropy v7.0.2 #338

Description

@troyraen

Ran into this in #337. Workaround is to use astropy>=7.2.0, which I did in #337. Just reporting this as FYI. May want to report upstream, though I'm not sure where (astroquery/astropy/numpy) or if that would even be useful given the old versions. Probably nothing else for us to do and this issue can be closed shortly.

#  !pip install 'astropy==7.0.2' numpy astroquery
>>> import astroquery, astropy, numpy
>>> astroquery.__version__
'0.4.11'
>>> astropy.__version__
'7.0.2'
>>> numpy.__version__
'2.5.0'
>>> import astroquery.ipac.irsa.most
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/envs/most-astropy702/lib/python3.12/site-packages/astroquery/ipac/irsa/__init__.py", line 38, in <module>
    from .core import Irsa, IrsaClass
  File "/opt/envs/most-astropy702/lib/python3.12/site-packages/astroquery/ipac/irsa/core.py", line 11, in <module>
    from astropy.coordinates import SkyCoord, Angle
  File "/opt/envs/most-astropy702/lib/python3.12/site-packages/astropy/coordinates/__init__.py", line 9, in <module>
    from .angles import *
  File "/opt/envs/most-astropy702/lib/python3.12/site-packages/astropy/coordinates/angles/__init__.py", line 9, in <module>
    from .core import *
  File "/opt/envs/most-astropy702/lib/python3.12/site-packages/astropy/coordinates/angles/core.py", line 15, in <module>
    from astropy import units as u
  File "/opt/envs/most-astropy702/lib/python3.12/site-packages/astropy/units/__init__.py", line 13, in <module>
    from . import (
  File "/opt/envs/most-astropy702/lib/python3.12/site-packages/astropy/units/astrophys.py", line 12, in <module>
    from astropy.constants import si as _si
  File "/opt/envs/most-astropy702/lib/python3.12/site-packages/astropy/constants/__init__.py", line 27, in <module>
    from . import cgs, si
  File "/opt/envs/most-astropy702/lib/python3.12/site-packages/astropy/constants/cgs.py", line 7, in <module>
    from .config import codata, iaudata
  File "/opt/envs/most-astropy702/lib/python3.12/site-packages/astropy/constants/config.py", line 15, in <module>
    codata = importlib.import_module(".constants." + phys_version, "astropy")
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/envs/base/lib/python3.12/importlib/__init__.py", line 90, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/envs/most-astropy702/lib/python3.12/site-packages/astropy/constants/codata2018.py", line 9, in <module>
    from .constant import Constant, EMConstant
  File "/opt/envs/most-astropy702/lib/python3.12/site-packages/astropy/constants/constant.py", line 11, in <module>
    from astropy.units.quantity import Quantity
  File "/opt/envs/most-astropy702/lib/python3.12/site-packages/astropy/units/quantity.py", line 28, in <module>
    from .quantity_helper import can_have_arbitrary_unit, check_output, converters_and_unit
  File "/opt/envs/most-astropy702/lib/python3.12/site-packages/astropy/units/quantity_helper/__init__.py", line 16, in <module>
    from . import erfa, function_helpers, helpers, scipy_special
  File "/opt/envs/most-astropy702/lib/python3.12/site-packages/astropy/units/quantity_helper/function_helpers.py", line 1239, in <module>
    @function_helper  # np.in1d deprecated in not NUMPY_LT_2_0.
     ^^^^^^^^^^^^^^^
  File "/opt/envs/most-astropy702/lib/python3.12/site-packages/astropy/units/quantity_helper/function_helpers.py", line 197, in __call__
    helps = getattr(module, f.__name__)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/envs/most-astropy702/lib/python3.12/site-packages/numpy/__init__.py", line 769, in __getattr__
    raise AttributeError(f"module {__name__!r} has no attribute {attr!r}")
AttributeError: module 'numpy' has no attribute 'in1d'. Did you mean: 'int16'?

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingupstream

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions