Currently, when user attempts to open a FITS image and then press Cancel, the GUI exits ungracefully as follows:
$ python example2_qt.py
No handlers could be found for logger "example2"
Traceback (most recent call last):
File "example2_qt.py", line 156, in open_file
self.load_file(fileName)
File "example2_qt.py", line 144, in load_file
image.load_file(filepath)
File ".../lib/python2.7/site-packages/ginga-2.1.20141220052723-py2.7.egg/ginga/AstroImage.py", line 97, in load_file
naxispath=naxispath)
File ".../lib/python2.7/site-packages/ginga-2.1.20141220052723-py2.7.egg/ginga/util/io_fits.py", line 124, in load_file
fits_f = pyfits.open(filepath, 'readonly')
File ".../lib/python2.7/site-packages/astropy/io/fits/hdu/hdulist.py", line 121, in fitsopen
raise ValueError('Empty filename: %s' % repr(name))
ValueError: Empty filename: u''
I was expecting the GUI to still be up and running, instead of crashing like this.
Currently, when user attempts to open a FITS image and then press Cancel, the GUI exits ungracefully as follows:
I was expecting the GUI to still be up and running, instead of crashing like this.