cryoem / eman2

A scientific image processing software suite with a focus on CryoEM and CryoET
143 stars 50 forks source link

RuntimeError: FileAccessException at ...libEM/io/hdfio2.cpp #571

Open tiborauer opened 1 week ago

tiborauer commented 1 week ago

The following simple code fails with the error in the title:

from libpyUtils2 import EMUtil
res = EMUtil.get_image_count("stack2.hdf")

stack2.hdf exists, and I have RW permission to it.

tiborauer commented 1 week ago

The test below suggested in https://groups.google.com/g/eman2/c/PDdP1VrSkYE worked without any issue.

e2proc3d.py :128:128:128:0 test.hdf
sludtke42 commented 1 week ago

What do you get from e2iminfo.py -H stack2.hdf ? (I’m assuming the same error)

If so, try running h5stat stack2.hdf

this program comes from the HDF5 library itself, not EMAN2, and should tell you if there is some structural problem with the file.

Where did stack2.hdf come from?

On Jun 27, 2024, at 3:58 PM, Tibor Auer @.***> wrote:

The test below suggested in https://groups.google.com/g/eman2/c/PDdP1VrSkYE worked without any issue.

e2proc3d.py :128:128:128:0 test.hdf — Reply to this email directly, view it on GitHub https://github.com/cryoem/eman2/issues/571#issuecomment-2194759000, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPKF2QJSZVSQLJRBGMCFPLZJQK77AVCNFSM6AAAAABJ77XUCCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJUG42TSMBQGA. You are receiving this because you are subscribed to this thread.

tiborauer commented 1 week ago

Thank you for the prompt answer!

e2iminfo.py -H stack2.hdf 
stack2.hdf  is not a recognized image format
h5stat stack2.hdf 
Filename: stack2.hdf
h5stat error: unable to open file "stack2.hdf"

I am supporting one of our researchers in this. I have to ask them about the provenance.

sludtke42 commented 1 week ago

If you type “ls -al” do you see stack2.hdf in the folder you’re running the program from?

On Jun 27, 2024, at 4:07 PM, Tibor Auer @.***> wrote:

Thank you for the prompt answer!

e2iminfo.py -H stack2.hdf stack2.hdf is not a recognized image format h5stat stack2.hdf Filename: stack2.hdf h5stat error: unable to open file "stack2.hdf" — Reply to this email directly, view it on GitHub https://github.com/cryoem/eman2/issues/571#issuecomment-2194791087, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPKF2R4CT3T3RYC6DFDZHDZJQMDXAVCNFSM6AAAAABJ77XUCCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJUG44TCMBYG4. You are receiving this because you commented.

tiborauer commented 1 week ago
ls -la
total 255548
drwxrwsr-x  4 abc123 abc123  261683402 Jun 27 14:12 .
drwxrwsr-x 12 abc123 abc123 1262903222 Jun 26 13:54 ..
drwxrwsr-x  2 abc123 abc123       2106 Jun 27 13:43 SPHIRE_LOG_HISTORY
drwxrwsr-x  2 abc123 abc123       3085 Jun 27 08:19 output
-rw-rw-r--  1 abc123 abc123        387 Jun 27 12:38 run_test.sh
-rwxrwxr-x  1 abc123 abc123  261677824 Jun 26 13:53 stack2.hdf
sludtke42 commented 1 week ago

You can do one last test just to make sure it isn’t a filesystem issue: cp stack2.hdf x.hdf if that works, as I expect it will, the implication is that this file is not in HDF5 format. Where did this file come from? I see a SPHIRE logfile there, and certainly SPHIRE will have EMAN2 compatible HDF5 files since they use the same library for I/O. Did this file come from SPHIRE or are you trying to use it with SPHIRE and it came from somewhere else? If it came from somewhere else, exactly how was it generated?

On Jun 27, 2024, at 4:13 PM, Tibor Auer @.***> wrote:

ls -la total 255548 drwxrwsr-x 4 usq33871 usq33871 261683402 Jun 27 14:12 . drwxrwsr-x 12 usq33871 usq33871 1262903222 Jun 26 13:54 .. drwxrwsr-x 2 usq33871 usq33871 2106 Jun 27 13:43 SPHIRE_LOG_HISTORY drwxrwsr-x 2 usq33871 usq33871 3085 Jun 27 08:19 output -rw-rw-r-- 1 usq33871 usq33871 387 Jun 27 12:38 run_test.sh -rwxrwxr-x 1 usq33871 usq33871 261677824 Jun 26 13:53 stack2.hdf — Reply to this email directly, view it on GitHub https://github.com/cryoem/eman2/issues/571#issuecomment-2194817248, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACPKF2W7JV5DHQZPROFPEA3ZJQM2NAVCNFSM6AAAAABJ77XUCCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJUHAYTOMRUHA. You are receiving this because you commented.

tiborauer commented 1 week ago

I have copied and renamed the file several times, so we can rule out any filesystem issue.

I have contacted the researcher on the file's origin. They responded by saying the original files are MRC files, which were converted into HDF using e2proc3d.py, as the GPU-isac seems to require HDF or (obsolete) bdb.

tiborauer commented 1 week ago

Update: Something must have gone wrong with the conversion. I redid it, and now it works.

Thank you for the pointers to the sanity checks!

sludtke42 commented 1 week ago

Glad you sorted it.Sent from my iPhoneOn Jun 27, 2024, at 6:45 PM, Tibor Auer @.***> wrote: Update: Something must have gone wrong with the conversion. I redid it, and now it works. Thank you for the pointers to the sanity checks!

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>