Hi Aashna,
Your description doesn't make much sense to me.  You must have some import statements preceding your run(...) line, otherwise you would get the error "NameError: name 'run' is not defined".  Maybe you should try putting your Python into a file (with '.py' suffix) and open that in ChimeraX and see what happens.

--Eric

Eric Pettersen
UCSF Computer Graphics Lab


On May 28, 2023, at 10:28 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. 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 'models'." I have not written any import statements at the top (this is the first line in the Python shell). I am getting similar errors when I run any run(session, ...) command. Could you please help me resolve this issue? Thanks in advance.

Warm regards,
Aashna
_______________________________________________
ChimeraX-users mailing list -- chimerax-users@cgl.ucsf.edu
To unsubscribe send an email to chimerax-users-leave@cgl.ucsf.edu
Manage subscription: