Right, it took a bit but I understand what the problem is now. This will
be fixed in the next release but for now:
*** DO NOT use the same directory for the "backup directory" as the
directory where the project exists (i.e. the directory in which
the top-level xml file resides) ***
The problem was that the code currently clears out that directory before
doing the backup. This was an attempt to clear out the garbage but
unfortunately has the serious side-effect as you have seen. So in the
next release the clear out will not happen. Also, currently the backup
file ends in *.xml, I'm changing that to *.xml.bac because if you are
using the same directory for backup as the directory then just using *.xml
means you are backing up the file to itself, which is not very helpful.
Note, there is a second backup mechanism in Analysis. When you save a
file it does an automatic copying of *.xml to *.xml.bak in case of
trouble with the save (it has been known to happen).
(I'm using "bac" for the suffix for the first auto-backup mechanism so we
can tell these files apart from the second backup mechanism, which uses
"bak". So you'll get two copies of backup files but better safe than
sorry.)
(If anyone wants an updated copy of the relevant python code,
python/memops/general/Io.py, before the next release let me know and I can
send it to them. Alternatively you can get it from the sourceforge
CVS repository, http://cvs.sourceforge.net/viewcvs.py/ccpn/, but note that
they don't seem to update that very quickly, so you might have to wait a
day or two before the fix appears there.)
Wayne
On Fri, 21 Jan 2005, Nicola Meenan wrote:
> Hi,
>
> Have been using the 1.0.1 release and encountered the following problem.
> Although, I can set successfully set up a new project, start assigning,save
> the project save and quit, at some point MolSystem.xml is lost (see below
> for error msg) and I cannot reload the project. Seem to be related to the
> backup function - has anyone else encountered this?
>
> Thanks,
>
>
> Nicky
>
>
> Exception in Tkinter callback
> Traceback (most recent call last):
> File "/usr/lib64/python2.2/lib-tk/Tkinter.py", line 1316, in __call__
> return apply(self.func, args)
> File "/usr/lib64/python2.2/lib-tk/Tkinter.py", line 436, in callit
> apply(func, args)
> File "/usr/local/ccpnmr/ccpnmr1.0/python/ccpnmr/analysis/Analysis.py",
> line 409, in doBackup
> backupXmlProjectFile(self.project, dir)
> File "/usr/local/ccpnmr/ccpnmr1.0/python/memops/general/Io.py", line 394,
> in backupXmlProjectFile
> shutil.copyfile(src, dst)
> File "/usr/lib64/python2.2/shutil.py", line 28, in copyfile
> fsrc = open(src, 'rb')
> IOError: [Errno 2] No such file or directory:
> '/home/nicolam/CCPNanalysis/FnBPA/ccp/MolSystem.xml'
> start generating ccp.Molecule output
> start generating ccp.Method output
> start generating ccp.Nmr output
> start generating ccpnmr.Analysis output
> start generating memops.Implementation output
> successfully saved project
>
|