Closed kirxkirx closed 1 year ago
Just realized that above I have a local copy of numpy
. Checked that the problem persists with both system-wide installation of numpy 1.23.5
and the local (user) installation upgraded to numpy 1.24.1
.
Thanks for the bug report! This looks like an astropy/numpy interaction to me. Could you please try opening the file with astropy and see if you still get this bug -- that is, remove Astrometry.net from the equation? Eg something like
python -c "from astropy.table import Table; Table.read('out908.xyls', format='fits')"
?
Another thing you could try would be to install fitsio
to read FITS files (pip install fitsio
), instead of astropy.
Thanks for the quick reply and the test suggestion!
Yes, it turns out from astropy.table import Table
fails:
$ python
Python 3.8.16 (default, Dec 15 2022, 15:50:21)
[GCC 11.2.1 20211127] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from astropy.table import Table
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.8/site-packages/astropy/table/__init__.py", line 4, in <module>
from .column import Column, MaskedColumn, StringTruncateWarning, ColumnInfo
File "/usr/lib/python3.8/site-packages/astropy/table/column.py", line 12, in <module>
from astropy.units import Unit, Quantity
File "/usr/lib/python3.8/site-packages/astropy/units/__init__.py", line 17, in <module>
from .quantity import *
File "/usr/lib/python3.8/site-packages/astropy/units/quantity.py", line 32, in <module>
from .quantity_helper import (converters_and_unit, can_have_arbitrary_unit,
File "/usr/lib/python3.8/site-packages/astropy/units/quantity_helper/__init__.py", line 10, in <module>
from . import helpers, function_helpers
File "/usr/lib/python3.8/site-packages/astropy/units/quantity_helper/function_helpers.py", line 116, in <module>
np.asscalar, np.alen,
File "/usr/lib/python3.8/site-packages/numpy/__init__.py", line 311, in __getattr__
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'asscalar'
>>>
while other parts of astropy
(like reading FITS images) seems to work fine. So this is an astropy
issue not directly related to astrometry.net
. I'm sorry for the confusion.
No problem! Thanks for filing a detailed bug report, makes it much easier to see what's going on!
I'm getting the following error when trying to run
solve-field
onSExtractor
-generated source list:The FITS-table with the source list and a BASH script that runs the above commands may be found in this archive: astrometry_net_test.zip
The problem with my scripts using
astrometry.net
solver appeared after a system upgrade which (I think) pulled new versions of bothastropy
andnumpy
. I was hoping that recompilingastrometry.net
using the latest version from github may solve the issue but it persists. Would appreciate any suggestions on how to fix this.I know that I should probably stop using system package manager to install python-related stuff and fully switch to
pip
orconda
instead.