Hi Aashna,
It looks like you must have done “from chimerax.core import session”, which means that the name ’session’ now refers to a Python module rather than the chimera.core.session.Session instance that the name “session” refers to when the Python shell starts up.  The session module has no ‘ui’ attribute — a Session instance does.  So just avoid issuing that import statement and I think things will start working for you.

--Eric

Eric Pettersen
UCSF Computer Graphics Lab


On Apr 7, 2023, at 7:41 PM, Aashna Soni via ChimeraX-users <chimerax-users@cgl.ucsf.edu> wrote:

Hi,
I hope this email finds you well. I am trying to use the ChimeraX Python shell to run commands programmatically (such as opening different protein structures, extracting the number of hydrogen bonds from a structure, changing the sel number, and saving the log file). When I try to run this command: run(session, "open <insert filepath>"), I am getting this error: "AttributeError: module 'chimerax.core.session' has no attribute 'ui'." I am getting similar errors when I run any run(session, ...) command, such as the first one on this tutorial: https://www.cgl.ucsf.edu/chimerax/docs/devel/tutorials/introduction.html. These commands were working around a month ago, and I am not sure why they are not working now. Could you please help me resolve this issue? Thanks in advance.

Warm regards,
Aashna
_______________________________________________
ChimeraX-users mailing list
ChimeraX-users@cgl.ucsf.edu
Manage subscription:
https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users