Error running solve field

Skip to first unread message

Alberto Madrigal

Sep 22, 2022, 12:42:23 AM (10 days ago) Sep 22
to astrometry

After using a lot astrometry without any problem, now when I try to solve an image I get the following error message:

Traceback (most recent call last):
  File "/usr/local/astrometry/bin/removelines", line 15, in <module>
  File "/usr/local/astrometry/lib/python/astrometry/util/", line 77, in main
    return removelines(infile, outfile, xcol=opt.xcol, ycol=opt.ycol,
  File "/usr/local/astrometry/lib/python/astrometry/util/", line 40, in removelines
    T = fits_table(infile, lower=False)
  File "/usr/local/astrometry/lib/python/astrometry/util/", line 676, in fits_table
    pf =, memmap=mmap)
AttributeError: 'NoPyfits' object has no attribute 'open'
augment-xylist.c:591:backtick Failed to run command: /usr/local/astrometry/bin/removelines -X X_IMAGE -Y Y_IMAGE /tmp/tmp.xyls.lWCxUs /tmp/tmp.removelines.8P9rsu
 ioutils.c:568:run_command_get_outputs Command failed: return value 1

I run it in Ubuntu 22.04.1 LTS and the astrometry version is 0.91 (after upload it to try to fix the problem).

Many thanks!


Dustin Lang

Sep 22, 2022, 9:06:05 AM (10 days ago) Sep 22
to Alberto Madrigal, astrometry

If python, you need either the 'fitsio' or 'astropy' package.  You should be able to do
python -m pip install --user fitsio
or maybe
python3 -m pip install --user fitsio  # or astropy

OR, to avoid running this 'removelines' step (and the uniformizing step that also uses python), do
solve-field --no-removelines --uniformize 0


You received this message because you are subscribed to the Google Groups "astrometry" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Alberto Madrigal

Sep 22, 2022, 11:18:19 AM (10 days ago) Sep 22
to Dustin Lang, astrometry
Hi! Thanks for your answer.

After many tries, I found the solution. I had installed yet those two libraries that you mention. The problem was pyfits. Ihave installed it as superuser and now astrometry works.


Reply all
Reply to author
0 new messages