Error in find particles from segmentation

27 views
Skip to first unread message

Ziao

unread,
Sep 12, 2021, 9:05:36 PM9/12/21
to EMAN2

Hi Steve,

I run into this error when I tried to find particles from a segmentation results.

NOT Writing notes, ppid=-2
Traceback (most recent call last):
  File "/opt/EMAN2/2.91/bin/e2spt_extractfromseg.py", line 154, in <module>
    main()
  File "/opt/EMAN2/2.91/bin/e2spt_extractfromseg.py", line 141, in main
    js["class_list"]=clst
  File "/opt/EMAN2/2.91/lib/python3.7/site-packages/EMAN2jsondb.py", line 905, in setval
    if not deferupdate : self.sync()
  File "/opt/EMAN2/2.91/lib/python3.7/site-packages/EMAN2jsondb.py", line 747, in sync
    jss=json.dumps(self.data,indent=0,sort_keys=True,default=obj_to_json)            # write the whole dictionary back to disk
  File "/opt/EMAN2/2.91/lib/python3.7/json/__init__.py", line 238, in dumps
    **kw).encode(obj)
  File "/opt/EMAN2/2.91/lib/python3.7/json/encoder.py", line 201, in encode
    chunks = list(chunks)
  File "/opt/EMAN2/2.91/lib/python3.7/json/encoder.py", line 431, in _iterencode
    yield from _iterencode_dict(o, _current_indent_level)
  File "/opt/EMAN2/2.91/lib/python3.7/json/encoder.py", line 405, in _iterencode_dict
    yield from chunks
  File "/opt/EMAN2/2.91/lib/python3.7/json/encoder.py", line 353, in _iterencode_dict
    items = sorted(dct.items(), key=lambda kv: kv[0])
TypeError: '<' not supported between instances of 'int' and 'str'

Any idea what I should do?

Let me know if you need more information.

Best,
Ziao

Muyuan Chen

unread,
Sep 12, 2021, 10:25:46 PM9/12/21
to em...@googlegroups.com
I heard reports of the bug a few times lately but cannot reproduce this myself. According to the message, it seems that there are some particle classes in this tomogram that are labeled as numbers instead of strings. It may be solved if you specify something in --featurename, but I am not too sure. Also check if the error goes away if you clear all particles in the same tomogram before running the program. You can also look at the json file corresponding to the tomogram in the info directory and see if there is anything odd in the "class_lst" key. 
Just noticed this email is directed to Steve, which might be why it got classified as spam in my gmail... Anyway, feel free to comment if you have insight on this.
Muyuan

--
--
----------------------------------------------------------------------------------------------
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 on the web visit https://groups.google.com/d/msgid/eman2/08c6847b-b1c1-4566-bb51-c81d16a08068n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages