Open RReverser opened 3 years ago
rawdata
might not be defined if you don't have a FITS reader installed (either astropy or fitsio).
@kbarbary I think I do have it installed, at least I followed the setup commands, and ./test.py
passes successfully too (which seems to use the same deps).
test.py
will skip tests that require a FITS reader if one isn't installed.
Looking at bench.py
, I'm pretty sure HAVE_FITS
is evaluating to False for you. So the astropy.io.fits and fitsio imports are failing for some reason. You might want to check that those imports succeed in your environment to debug.
All this said, bench.py
should still work if a FITS reader isn't installed, so there is a bug there. Sorry about that! It isn't a super robust script I guess.
test.py
will skip tests that require a FITS reader if one isn't installed.
Ah, I see, that probably explains it. It could probably be more useful to require FITS there too, to make sure all tests are ran.
I'll try to install other deps you mentioned.
Installing those deps has indeed fixed the issue, thanks. I'll keep this issue open though, as the script should probably be more robust in face of missing deps as you mentioned above.
I was trying to run bench.py to compare master branch and my other changes, but it doesn't seem to work:
I fixed this one by defining
rawdata = None
at the top level of the script, but then another error pops up:Is bench.py supposed to work in general?