vterron / lemon

Differential photometry for humans (and astronomers)
64 stars 21 forks source link

astrometry — TypeError: ('__init__() takes at least 3 arguments (1 given) #69

Closed sameeresque closed 8 years ago

sameeresque commented 8 years ago
sameer@sameer-HP-406-G1-MT://media/sameer/Data/tobereduced/Dr.Veeresh-NLS1s/24DEC2015MIRO$
lemon astrometry *.fits 1H/
>> Images will be saved to directory '1H/'
>> Using a local build of Astrometry.net.
>> Doing astrometry on the 1 paths given as input.
Traceback (most recent call last):
  File "/home/sameer/lemon/methods.py", line 592, in wrapper
    return func(*args, **kwargs)
  File "/home/sameer/lemon/astrometry.py", line 322, in parallel_astrometry
    output_path = astrometry_net(img.path, **kwargs)
  File "/home/sameer/lemon/astrometry.py", line 248, in astrometry_net
    raise AstrometryNetError(e.returncode, e.cmd)
AstrometryNetError: Command '['solve-field',
'zs1H0323+342_J_60s_Pos1_1.fits', '--dir',
'/tmp/zs1H0323+342_J_60s_Pos1_1_0YRWbF_astrometry.net', '--no-plots',
'--new-fits', '/tmp/zs1H0323+342_J_60s_Pos1_1_astrometry_Y0pmtl.fits',
'--no-fits2fits', '--overwrite', '--radius', '1.000000']' returned
non-zero exit status 255

Exception in thread Thread-3:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 763, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.7/multiprocessing/pool.py", line 380, in
_handle_results
    task = get()
TypeError: ('__init__() takes at least 3 arguments (1 given)', <class
'astrometry.AstrometryNetError'>, ())

>> 0%[>
    ]
sameeresque commented 8 years ago

It was due to improper referencing of path in astrometry.cfg

vterron commented 8 years ago

If you encounter an error with the astrometry command it is almost always useful to run the command again with the --ncores=1 -v options, so that only one image is processed at a time and you can see the Astrometry.net output. This usually helps figure out what is wrong.