e2display crash error

7 views
Skip to first unread message

Ian McCue

unread,
Nov 13, 2025, 10:34:35 PM (4 days ago) Nov 13
to EMAN2
Hello everyone! 

Having an e2display.py error after building from git. See below:

(eman2) [ianmccue ~]$ e2display.py
Traceback (most recent call last):
  File "/app/user_dirs/ianmccue/miniforge3/envs/eman2/lib/python3.12/site-packages/eman2_gui/embrowser.py", line 4053, in updateDetailsDisplay
    rmin=rdr[min(rid)[1]]; rmax=rdr[max(rid)[1]]
             ~~~~~~~~^^^
IndexError: invalid index to scalar variable.
Aborted (core dumped)

Reading a previous issue I'm also sharing some information about the graphics card:
(eman2) [ianmccue ~]$ glxinfo | grep "OpenGL version"
OpenGL version string: 3.3 (Compatibility Profile) Mesa 24.2.8

Is this just a Mesa issue vs OpenGL? 

Thanks for your help!! 

-Ian 

Steve Ludtke

unread,
Nov 13, 2025, 10:48:59 PM (4 days ago) Nov 13
to em...@googlegroups.com
That's a very strange error, and I don't see how it could be related to the OpenGL version. This seems more like a PyQt update issue. If you look at line 4052 of embrowser.py you should see that rid is a list of 2-tuples, so min(rid)[1] shouldn't be a problem at all, and I can't reproduce this issue...

Not sure what your python experience level is. If you want to help debug, you could try adding:
print(rid)
on the line just before the line producing the error, then run e2display again. This should produce some useful output on the line before the Traceback...

It would also be good to see the output of e2version.py, though I don't believe that's an issue in this case.

cheers


---
Steven Ludtke, Ph.D. <slu...@bcm.edu>                      Baylor College of Medicine
Charles C. Bell Jr., Professor of Structural Biology        Dept. of Biochemistry 
Deputy Director, Advanced Technology Cores                  and Molecular Pharmacology
Academic Director, CryoEM Core
Co-Director CIBR Center


--
--
----------------------------------------------------------------------------------------------
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/dfa818d6-0882-489a-9114-dbcbc21bcaf8n%40googlegroups.com.

Ian McCue

unread,
Nov 15, 2025, 9:47:40 AM (3 days ago) Nov 15
to EMAN2
Hi Steve,

Thank you for the quick reply! Added 'print(rid)' at line 4053. Output below with e2version.py preceding.

(eman2) [ianmccue]$ e2version.py
EMAN 2.99.70 ( GITHUB: 2025-11-13 21:27 - commit: 771080bda )
Your EMAN2 is running on: Linux-5.14.0-570.52.1.el9_6.x86_64-x86_64-with-glibc2.34 5.14.0-570.52.1.el9_6.x86_64
Your Python version is: 3.12.12
(eman2) [ianmccue]$ e2display.py
[(19, 0), (15, 1), (6, 2), (5, 3)]

Traceback (most recent call last):
  File "/app/user_dirs/ianmccue/miniforge3/envs/eman2/lib/python3.12/site-packages/eman2_gui/embrowser.py", line 4054, in updateDetailsDisplay

    rmin=rdr[min(rid)[1]]; rmax=rdr[max(rid)[1]]
             ~~~~~~~~^^^
IndexError: invalid index to scalar variable.
Aborted (core dumped)
 
Checking on some of the other variables it seems the issue is that min(rid) isn't recognized as a list of tuples? output below:
rid: [(19, 0), (15, 1), (6, 2), (5, 3)]
min(rid): 0
rid contents: [(19, 0), (15, 1), (6, 2), (5, 3)]
min(rid): 0 type: <class 'numpy.int64'>

Is the min function from numpy what should be called here? 

-Ian M. 

Steve Ludtke

unread,
Nov 15, 2025, 1:25:00 PM (3 days ago) Nov 15
to em...@googlegroups.com
That is very strange... e2display.py and embrowser.py basically don't use NumPy at all (directly, the opened widgets use it, of course). This message seems to imply that a "from numpy import *" or "from numpy import min" was executed somewhere, which is something EMAN never does anywhere. It's always "import numpy as np".

This is a long shot, but there is no chance that you have a python initialization script set up via the PYTHONSTARTUP shell variable which is doing something like this with NumPy?   The behavior of numpy's min() function is fundamentally different than the native min() so it will cause no end of problems, one of many reasons why people never do "from numpy import *"...


Ian McCue

unread,
Nov 16, 2025, 9:39:05 AM (2 days ago) Nov 16
to EMAN2
Hey Steve,

No luck on echo $PYTHONSTARTUP , to mitigate I've imported builtins and run builtins.min and builtins.max on that line. Seems to be working fine now, but good to know that this is some random error and not GPU config issue. 

Thanks for your help in troubleshooting! Let me know if you need anything more from me. 

-Ian M. 

Steve Ludtke

unread,
Nov 17, 2025, 7:36:36 AM (yesterday) Nov 17
to em...@googlegroups.com
Huh... well your mitigation confirms that _something_ is causing the equivalent of "from numpy import *". Out of curiosity I looked for that expression throughout EMAN2, and it actually does exist in a few specific places (something I'll have to look into, because it really isn't a good idea). I went ahead and added a protective import similar to your change at the beginning of embrowser.py, but it isn't clear to me why this isn't happening for anyone else?  A little mysterious.  

Reply all
Reply to author
Forward
0 new messages