[chimera-dev] rc(command): save session command problem

Eric Pettersen pett at cgl.ucsf.edu
Thu Feb 28 10:53:42 PST 2019


Hi Yuhong,
	That is a weird problem, particularly that it happens on only one of two macs you have.  It certainly doesn’t happen for me.  If I open Chimera’s IDLE shell and type in similar commands to yours, they work fine.  If I run the commands from a file (attached), they also work fine.  So you should probably look at the saveSession() routine in SimpleSession/save.py and (on the problematic mac) make the same calls as it does and see what they return, namely:

what does os.path.dirname(“current_session.py”) return?
after your os.chdir(path), what does os.getcwd() return?
what does os.path.exists(path) return?

If those look okay, you probably should insert print statements in the saveSession() routine to get some kind of idea about what’s happening.

—Eric

	Eric Pettersen
	UCSF Computer Graphics Lab






> On Feb 27, 2019, at 1:41 PM, Yuhong Zha <zha0 at purdue.edu> wrote:
> 
> Dear Sir or Madam,
> 
> This is Yuhong Zha from the Kihara Bioinformatics Laboratory. We are currently developing a Chimera extension to implement our MAINMAST algorithm. However, we encountered a problem of using Chimera's command line "rc("save current_session.py")" to save current session. This problem only happens in some Mac system.
> 
> In our extension, we want to save the whole session after open some files. So we first do "os.chdir(path)" to where we want to store the file. Then we use "rc("save current_session.py")" to save the current session info to a file. However, after we changed the current working directory correctly, "rc("save current_session.py")" still fails and displays error message of "Directory () does not exists". I have attached the code and error we encounter. I checked the current working directory right before calling "rc("save current_session.py)" and I am sure the current working directory is correct and is not (). Is there any settings we missed that result in rc(command) only execute at directory ()? Or is there any way that we can specify which directory we want to save the session using rc(command)?
> 
> We tried it on 2 Mac but only one of them has this problem. I am thinking maybe some preference setup would cause this problem?
> 
> Also, we encountered a problem of "Access Denied" when modifying the files from Chimera. On one Mac, we updated to the latest version chimera. But when we run our extension, we get "Access Denied" error when try to remove some files. No such error occurs within the same Mac before updating the version. Do you have any clue why that happens.
> 
> If there is any question regarding our extension, please let me know! For more information about our lab, here is the link to our website: http://www.kiharalab.org/index.php <http://www.kiharalab.org/index.php>.
> Kihara Bioinformatics Laboratory, Purdue University <http://www.kiharalab.org/index.php>
> www.kiharalab.org <http://www.kiharalab.org/>
> Area of Research Dr. Daisuke Kihara Principal Investigator. Our research interests lie in the area of bioinformatics. We employ computational methods to elucidate intertwined relationships between protein/gene sequences, structure, function, interactions, genome, and pathways.
> 
> 
> Thank you in advance for your help and looking forward to your reply!
> 
> Best,
> Yuhong Zha,
> Kihara Bioinformatics Laboratory,
> Department of Biological & Computer Science at Purdue University
> 
> <PastedGraphic-5.png><Screen Shot 2019-02-27 at 4.37.30 PM.png>_______________________________________________
> Chimera-dev mailing list
> Chimera-dev at cgl.ucsf.edu <mailto:Chimera-dev at cgl.ucsf.edu>
> http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev <http://plato.cgl.ucsf.edu/mailman/listinfo/chimera-dev>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-dev/attachments/20190228/5d38dac1/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testsave.py
Type: text/x-python-script
Size: 91 bytes
Desc: not available
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-dev/attachments/20190228/5d38dac1/attachment.bin>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://plato.cgl.ucsf.edu/pipermail/chimera-dev/attachments/20190228/5d38dac1/attachment-0001.html>


More information about the Chimera-dev mailing list