e2spt_extract.py KeyError: 'tlt_params'

14 views
Skip to first unread message

Raven Gonsoulin

unread,
Apr 8, 2026, 11:42:44 AM (6 days ago) Apr 8
to EMAN2

Hello all,

I am trying to extract particles picked with the convnet, but am receiving the pictured error below. The tomograms used were reconstructed in EMAN2 using e2projectmanager.py
I checked info/.lst_info.json and it was an empty. However, I also checked the info/Position_xyz_info.json which did contain the "tlt_params" info along with other expected info e.g. "tlt_file", "ali_loss", "apix_unbin", etc.

Command used (same as what was tried previously from the GUI):
e2spt_extract.py tomograms/ --boxsz_unbin=72 --label=tomobox --newlabel=extracted_tomobox --threads=24 --maxtilt=100 --padtwod=2.0 --alltomograms --shrink=1.0 --tltkeep=1.0 --rmbeadthr=-1.0 --compressbits=8

Output:

Let me know if there is any missing context that could be helpful for solving this issue.


Thank you,
Raven

Steve Ludtke

unread,
Apr 8, 2026, 12:57:26 PM (6 days ago) Apr 8
to em...@googlegroups.com
Hi Raven,

Your command specified "tomograms/" as the files you wished to extract particles from. This is an empty filename, so it doesn't exist. If you want to extract for all tomograms, you should use the "--alltomograms" option (or checkbox). If you want to specify a subset of tomograms to use, you need to list them explicitly either with wildcards or using the "browse" interface in e2projectmanager

Raven Gonsoulin

unread,
Apr 8, 2026, 3:41:58 PM (6 days ago) Apr 8
to EMAN2
I tried both the 'alltomograms' checkbox in the GUI and the --alltomograms option for the command line with the same error. Also I am noticing the image of the error I had copied in the original message is not visible as I reply so I am retyping the error message here:

"
NOT Writing notes, ppid=-2
Reading from tomograms/.lst__bin4.hdf...
Traceback (most recent call last):
  File "/home/bullitt/src/shared/miniforge3/envs/eman2/bin/e2spt_extract.py", line 187, in do_extraction
    ttparams=np.array(js["tlt_params"])
                      ~~^^^^^^^^^^^^^^
  File "/home/bullitt/src/shared/miniforge3/envs/eman2/lib/python3.12/site-packages/EMAN2jsondb.py", line 881, in get
    raise KeyError(key)
KeyError: 'tlt_params'

ERROR: tlt_params missing in info/.lst_info.json. The most likely cause for this is trying to use a tomogram
reconstructed in another program. Subtomogram averaging in EMAN2 makes extensive use of the original tilt series
as well as alignment parameters, so use of tomograms from other software is not supported in the normal sequence.
"

What seems to have worked thus far was manually selecting all tomograms (or the equivalent of typing each individual tomogram in the command line i.e. "e2spt_extract.py tomograms/Position_x tomograms/Position_y tomograms/Position_z ...").

Thanks,
Raven

Steve Ludtke

unread,
Apr 8, 2026, 4:51:30 PM (6 days ago) Apr 8
to em...@googlegroups.com
The image did come through, it probably just didn't get copied in the reply?

Anyway let me explain more. At first glance, the problem looks like it is:
KeyError: 'tlt_params'
as if somehow the tilt information wasn't properly stored. However, if you look more carefully, you see:

Reading from tomograms/.lst__bin4.hdf
at the beginning. What is "tomograms/.lst__bin4.hdf" ?  Seems a nonsensical filename, which is why I focused in on you listing tomograms/ as a file to operate on, as it is a folder name, but doesn't have the name of any actual files.

--alltomograms is supposed to override any specific path you provided (so the tomograms/ you had should have been harmless).

Could you run 'ls -al tomograms' and post the output?  My suspicion is that you have some strangely named file ending in .hdf in tomograms/ which is confusing it.



--
--
----------------------------------------------------------------------------------------------
You received this message because you are subscribed to the Google
Groups "EMAN2" group.
To post to this group, send email to em...@googlegroups.com
To unsubscribe from this group, send email to eman2+un...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/eman2

---
You received this message because you are subscribed to the Google Groups "EMAN2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to eman2+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/eman2/6a6c8690-25e8-4840-b26f-c25e188b241an%40googlegroups.com.

Raven Gonsoulin

unread,
Apr 8, 2026, 5:09:31 PM (6 days ago) Apr 8
to em...@googlegroups.com
Oh I understand now. And it looks like you are exactly right, there was a hidden file ".lst__bin4.hdf". I am not sure what this file is from, but could it cause problems downstream? If so, should it be moved or removed from the tomogram directory?

image.png

Thanks,
Raven

You received this message because you are subscribed to a topic in the Google Groups "EMAN2" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/eman2/PY1Bu6nRQUw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to eman2+un...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/eman2/1589898F-A0EB-4F1F-AE06-09CF9742C1D9%40gmail.com.

Steve Ludtke

unread,
Apr 8, 2026, 5:11:50 PM (6 days ago) Apr 8
to em...@googlegroups.com
You should definitely remove that extraneous file. You might also check tiltseries/ to make sure there isn't a similar file there. Not sure where this came from, but shouldn't be there.

On Apr 8, 2026, at 4:09 PM, 'Raven Gonsoulin' via EMAN2 <em...@googlegroups.com> wrote:

Oh I understand now. And it looks like you are exactly right, there was a hidden file ".lst__bin4.hdf". I am not sure what this file is from, but could it cause problems downstream? If so, should it be moved or removed from the tomogram directory?

<image.png>

Thanks,
Raven
Reply all
Reply to author
Forward
0 new messages