UCBerkeleySETI / turbo_seti

turboSETI -- python based SETI search algorithm.
http://turbo-seti.readthedocs.io
MIT License
53 stars 38 forks source link

When an input file cannot be found, the report is confusing #42

Closed texadactyl closed 4 years ago

texadactyl commented 4 years ago
Calling FindDoppler(/mnt/elkdata/seti/data/voyager/Voyager1.single_coarse.fine_res.h5?)
Traceback (most recent call last):

  File "/mnt/elkdata/seti/test_turbo_seti/seti2.py", line 12, in <module>
    FD = FindDoppler(datafile=DATAFILE, max_drift=2, out_dir="/mnt/elkdata/seti/data/")

  File "/home/elkins/.local/lib/python3.8/site-packages/turbo_seti/find_doppler/find_doppler.py", line 65, in __init__
    self.data_handle = DATAHandle(datafile, out_dir=out_dir, n_coarse_chan=n_coarse_chan, coarse_chans=coarse_chans)

  File "/home/elkins/.local/lib/python3.8/site-packages/turbo_seti/find_doppler/data_handler.py", line 70, in __init__
    errmsg = "File {} doesn\'t exists, please check!".format(self.filename)

AttributeError: 'DATAHandle' object has no attribute 'filename'

Fix in data_handler.py is simple, beginning at line 68:

        else:
            self.status = False
            errmsg = "File {} doesn\'t exist, please check!".format(filename)
            logger.error(errmsg)
            raise IOError(errmsg)
texadactyl commented 4 years ago

With the fix, I see this instead:

OSError: File /mnt/elkdata/seti/data/voyager/Voyager1.single_coarse.fine_res.h5? doesn't exist, please check!