<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Aashna,<div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>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.</div><div class=""><br class=""></div><div class=""><div class="">--Eric</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>Eric Pettersen</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>UCSF Computer Graphics Lab</div><div class=""><br class=""></div><div><br class=""><blockquote type="cite" class=""><div class="">On Apr 7, 2023, at 7:41 PM, Aashna Soni via ChimeraX-users <<a href="mailto:chimerax-users@cgl.ucsf.edu" class="">chimerax-users@cgl.ucsf.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Hi,<div class="">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: <a href="https://www.cgl.ucsf.edu/chimerax/docs/devel/tutorials/introduction.html" class="">https://www.cgl.ucsf.edu/chimerax/docs/devel/tutorials/introduction.html</a>. 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.</div><div class=""><br class=""></div><div class="">Warm regards,</div><div class="">Aashna</div></div>
_______________________________________________<br class="">ChimeraX-users mailing list<br class=""><a href="mailto:ChimeraX-users@cgl.ucsf.edu" class="">ChimeraX-users@cgl.ucsf.edu</a><br class="">Manage subscription:<br class="">https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users<br class=""></div></blockquote></div><br class=""></div></body></html>