eisfabian / PACEtomo

Parallel cryo electron tomography via beam image shift
GNU General Public License v3.0
27 stars 6 forks source link

ValueError from ctffind #9

Closed MoritzWM closed 1 year ago

MoritzWM commented 2 years ago

Hi! Today I encountered a crash in your current beta, though I think it will be very easy to fix. Below you find the relevant part of the log file:

Ctffind: defocus: -3.666,  astig: 2.226 um,  angle: -17.5,  score 0.0362,   fit to -1.$ A

Error in Python script:
Traceback (most recent call last):
  File "<stdin>", line 459, in Script #2
        Tilt(minustilt, i * 4 + j + 3)
  File "<stdin>", line 246, in Script #2 - Tilt
            (cfind, RepVal2, RepVal3, RepVal4, RepVal5, cres) = sem.CtfFind("A", (targetDefocus - 2), (targetDefocus + 2))
ValueError: not enough values to unpack (expected 6, got 5)

It seems that sem.CtfFind sometimes only returns 5 values instead of 6. Best, Moritz

eisfabian commented 2 years ago

Hi Moritz!

Thanks so much for reporting it! Actually, a colleague of mine here ran into this issue before on one of our Titans. I was talking to David about it, but he could not reproduce it. This issue is, why I added the doCtfFind option in the settings. As far as I can tell it only affects certain machines and is a problem of CtfFind so there is not much I can do about it. However, I will try to include a catch in the next version so that PACEtomo will at least not crash when the error occurs.

Best, Fabian

MoritzWM commented 2 years ago

Great, thanks! I figured that was probably why you had the doCtfFind option, but a try/except block or a length check would be cleaner. I'll implement it in my next Krios session and submit a pull request, unless you're faster of course ;)

eisfabian commented 1 year ago

Fixed it in the new v1.4!