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

Tests fail with AttributeError: module 'numpy' has no attribute 'asscalar'. Did you mean: 'isscalar'? #437

Open
TheChymera opened this issue Jan 13, 2023 · 3 comments

Comments

@TheChymera
Copy link

Here is the build log for 0.18.3 (the same error also occurs with 0.16.1) → https://ppb.chymera.eu/b28389.log

This is the excerpt of the error traceback from the log:

ImportError while loading conftest '/var/tmp/portage/dev-python/gwcs-0.18.3/work/gwcs-0.18.3/gwcs/tests/conftest.py'.
gwcs/__init__.py:72: in <module>
    from .wcs import *   # noqa
gwcs/wcs.py:8: in <module>
    from astropy import units as u
/usr/lib/python3.10/site-packages/astropy/units/__init__.py:17: in <module>
    from .quantity import *
/usr/lib/python3.10/site-packages/astropy/units/quantity.py:32: in <module>
    from .quantity_helper import (converters_and_unit, can_have_arbitrary_unit,
/usr/lib/python3.10/site-packages/astropy/units/quantity_helper/__init__.py:10: in <module>
    from . import helpers, function_helpers
/usr/lib/python3.10/site-packages/astropy/units/quantity_helper/function_helpers.py:116: in <module>
    np.asscalar, np.alen,
/usr/lib/python3.10/site-packages/numpy/__init__.py:284: in __getattr__
    raise AttributeError("module {!r} has no attribute "
E   AttributeError: module 'numpy' has no attribute 'asscalar'. Did you mean: 'isscalar'?
@WilliamJamieson
Copy link
Contributor

Please include a full pip freeze.

@nden
Copy link
Collaborator

nden commented Jun 3, 2023

I can't reproduce this. It may be a version mismatch. @TheChymera Do you think it's still a problem?

@WilliamJamieson
Copy link
Contributor

This is an issue with the installed astropy vs numpy version not gwcs as the traceback is when gwcs imports from astropy. In the future, include a pip freeze with such issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants