Error when trying to do a file import

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Error when trying to do a file import

johnthelast
When I try to do a file import sequence, I get the following messages. I don't even get to the point where it asks for a directory.

AIJ 6.0.4.03; ImageJ 1.54m1; Java 25.0.2 [64-bit]; Windows 11 10.0; 107MB of 98240MB (<1%)
 
java.lang.RuntimeException: nom.tam.fits.TruncatedFileException: Got only 57 of 80 bytes expected for a header card
        at ij.plugin.FITS_Reader.run(FITS_Reader.java:184)
        at ij.IJ.runPlugIn(IJ.java:216)
        at ij.IJ.runPlugIn(IJ.java:199)
        at ij.io.Opener.openImage(Opener.java:383)
        at ij.plugin.FolderOpener.getFileCount(FolderOpener.java:1026)
        at ij.plugin.FolderOpener.showDialog(FolderOpener.java:695)
        at ij.plugin.FolderOpener.run(FolderOpener.java:172)
        at ij.IJ.runPlugIn(IJ.java:216)
        at ij.Executer.runCommand(Executer.java:156)
        at ij.Executer.run(Executer.java:74)
        at java.base/java.lang.Thread.run(Unknown Source)
Caused by: nom.tam.fits.TruncatedFileException: Got only 57 of 80 bytes expected for a header card
        at nom.tam.fits.HeaderCard.readRecord(HeaderCard.java:1776)
        at nom.tam.fits.HeaderCard.readOneHeaderLine(HeaderCard.java:1798)
        at nom.tam.fits.HeaderCard.<init>(HeaderCard.java:204)
        at nom.tam.fits.Header.read(Header.java:2016)
        at nom.tam.fits.Header.readHeader(Header.java:244)
        at nom.tam.fits.Fits.readHDU(Fits.java:1156)
        at nom.tam.fits.Fits.readToEnd(Fits.java:1191)
        at nom.tam.fits.Fits.read(Fits.java:1101)
        at ij.astro.io.FitsReader.<init>(FitsReader.java:90)
        at ij.astro.io.FitsReader.<init>(FitsReader.java:83)
        at ij.astro.io.FitsReader.create(FitsReader.java:121)
        at ij.plugin.FITS_Reader.run(FITS_Reader.java:136)
        ... 10 more
Reply | Threaded
Open this post in threaded view
|

Re: Error when trying to do a file import

johnthelast
I was able to clear the issue by doing an options reset. It looks like the directory that it picked up was my download directory and one of the files must have been bad. Looks like it picked up the last directory I was working with and failed on one of the files.
Reply | Threaded
Open this post in threaded view
|

Re: Error when trying to do a file import

johnthelast
It had happened again. Not sure what the root cause is, but the symptom is that when I try to do an import sequence, the program picks up a "cached" for lack of a better word directory which does not have any .fits files in it and blows up.

I can avoid the problem by doing a manual import from a valid directory and then restarting the program.
Reply | Threaded
Open this post in threaded view
|

Re: Error when trying to do a file import

karenacollins
Administrator
This should be fixed in the 6.0.4.04 daily build (or later). Let us know if this resolves the problem.

Karen
Reply | Threaded
Open this post in threaded view
|

Re: Error when trying to do a file import

johnthelast
Looks like it is resolved. I tried a couple of runs and the problem did not reoccur. Thanks for the quick fix.