JiscMail Logo
Email discussion lists for the UK Education and Research communities

Help for CCPNMR Archives


CCPNMR Archives

CCPNMR Archives


CCPNMR@JISCMAIL.AC.UK


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

CCPNMR Home

CCPNMR Home

CCPNMR  February 2005

CCPNMR February 2005

Options

Subscribe or Unsubscribe

Subscribe or Unsubscribe

Log In

Log In

Get Password

Get Password

Subject:

Re: Opening project error

From:

Rasmus Fogh <[log in to unmask]>

Reply-To:

CcpNmr software mailing list <[log in to unmask]>

Date:

Thu, 24 Feb 2005 13:54:57 +0000

Content-Type:

TEXT/PLAIN

Parts/Attachments:

Parts/Attachments

TEXT/PLAIN (215 lines)

Dear All,

We have found out the problem and Wayne will look at the best ways to
change the Analysis code to avoid it.

The error only comes when the Analysis code is called, so you can load
your data and get to fix them if you do not use Analysis. The easiest way
to do it might be to start the FormatConverter on its own. Alternatively
you can do it the hard way:

python
>>> from memops.xml import Implementation
>>> project = Implementation.load(open('myProject.xml'))

where myProject.xml is replaced by the full path from your start directory
to your project.xml. You now have your project, and can use the API
commands from teh command line to interact with the objects.

Yours,

Rasmus


PS, If you are *really* interested, here is some background - it is rather
arcane, I am afraid.

- The link SpectrumWindowView.dataSource is derived, one-way, and
mandatory. This means that it is calculated from other information only
when it is needed (derived), that the DataSource does not know that there
is a link to it (one-way), and that it is an error if there is no
DataSource found (mandatory). If you delete a DataSource that has a link
to it you will leave the derived link dangling - and when you then access
the link you will get an error. It so happens that Analysis makes a
function call (findFirstSpectumWIndowView) that accesses all the
dataSource links.

- Serials are almost guaranteed to be unique, but not quite. If you delete
the object with the highest serial (e.g. 9), save, quit, and re-enter the
program, the data do not remember that there was once an object with
serial=9, and so reuses serial 9. This is a bit naughty, but it would be
rather clunky to fix. Anyway, if you delete the Experiment with the
highest serial, leaving a dangling link, and then later add a new one with
the same serial, you may get some confusion.

Rasmus

---------------------------------------------------------------------------
Dr. Rasmus H. Fogh                  Email: [log in to unmask]
Dept. of Biochemistry, University of Cambridge,
80 Tennis Court Road, Cambridge CB2 1GA, UK.     FAX (01223)766002

On Fri, 18 Feb 2005, Wayne Boucher wrote:

> It depends what you mean by "number 9".  If that is the spectrum name that
> you entered when loading the spectrum then that is not the same as the
> serials.  Both the experimentSerial and the dataSourceSerial are
> automatically set by the API (and are integers, not strings), whereas the
> spectrum (and experiment) name is chosen by the user.  But if the "number
> 9" does refer to the experimentSerial then what you say can happen (I
> think, Rasmus would know for sure).  Needless to say, when you delete a
> spectrum it is supposed to happen automatically that the associated
> spectrumWindowViews (for a given spectrum there is one for each
> spectrumWindow) get deleted, but that seems not to have happened here.
>
> A few more words about the error message, for the general audience.  It
> mentioned "key[9, 1]" and if you look at the documentation for
> SpectrumWindowView:
>
> http://www.ccpn.ac.uk/ccpnmr/ccpnmr/python/ccpnmr/api/doc/Analysis/SpectrumWindowView/index.html
>
> you see that the "main key" is (experimentSerial, dataSourceSerial) so
> that is why it is experimentSerial=9 and dataSourceSerial=1.
>
> Wayne
>
> On Fri, 18 Feb 2005, Magnus Helgstrand wrote:
>
> > Hi!
> >
> > I do not know if this helps, but I originally had a 3D-spectrum as "number 9". I then deleted that spectrum and loaded a new 2D-spectrum. The new spectrum then got "number 9".
> >
> > Looking in the Analysis.xml file I now find:
> >
> >   <SpectrumWindowView _ID="_5828" isPosVisible="true" isNegVisible="true" experimentSerial="9" dataSourceSerial="1" isSliceVisible="true">
> >     <AxisMapping _ID="_5829" dim="1" label="x">
> >     </AxisMapping>
> >     <AxisMapping _ID="_5830" dim="2" label="z1">
> >     </AxisMapping>
> >     <AxisMapping _ID="_5831" dim="3" label="y">
> >     </AxisMapping>
> >     <WindowPeakList _ID="_5832" isSymbolDrawn="true" isAnnotationDrawn="true" peakListSerial="1">
> >     </WindowPeakList>
> >   </SpectrumWindowView>
> >
> > Which probably is data for the old spectrum.
> >
> > Magnus
> >
> > ----------------------------------
> > Magnus Helgstrand
> > Dept. of Biophysical Chemistry
> > Lund University
> > Box 124
> > SE-221 00 Lund
> > Sweden
> >
> > Phone: +46-46-2228173
> >
> > ----- Original Message -----
> > From: Wayne Boucher <[log in to unmask]>
> > Date: Thursday, February 17, 2005 1:18 pm
> > Subject: Re: Opening project error
> >
> > > Yuk.  I'm not sure why you got that error message originally.  It
> > > seems to
> > > be complaining that a spectrum (dataSource) does not exist
> > > although you
> > > have a peakList in your hand at that point and its parent is that
> > > spectrum.  So how can it be failing?  (Rasmus might have some
> > > ideas on
> > > this point.)
> > >
> > > The short-term fix for you is to delete that spectrumWindowView
> > > from the
> > > xml file.  Before you do that make a copy of the old one just in case!
> > > The file you want to edit is in the ccpnmr directory of the
> > > project (so if
> > > the top project file is called test1.xml then the directory would
> > > normallybe test1/ccpnmr).  In there is the Analysis.xml file.
> > > Edit that and look
> > > for the SpectrumWindowView with experimentSerial 9 and
> > > dataSourceSerial 1
> > > (which is what the error message is complaing about) and delete
> > > it.  That
> > > means delete everything from
> > >
> > >  <SpectrumWindowView _ID=... experimentSerial="9"
> > > dataSourceSerial="1" ...>
> > >
> > > down to
> > >
> > >  </SpectrumWindowView>
> > >
> > > If you have multiple windows then this might need to be repeated
> > > for the
> > > other windows as well.
> > >
> > > Wayne
> > >
> > > On Thu, 17 Feb 2005, Magnus Helgstrand wrote:
> > >
> > > > Hi!
> > > >
> > > > After opening a spectra processed usgin NMRPipe I got the
> > > following error messages:
> > > >
> > > > Spectrum successfully opened
> > > > Exception in Tkinter callback
> > > > Traceback (most recent call last):
> > > >   File "/usr/local/ccpnmr/python2.2/lib/python2.2/lib-
> > > tk/Tkinter.py", line 1316, in __call__
> > > >     return apply(self.func, args)
> > > >   File
> > > "/usr/local/ccpnmr/ccpnmr1.0/python/ccpnmr/analysis/OpenSpectrumPopup.py", line 191, in openSpectra
> > > >     self.parent.finishInitSpectrum(spectrum)
> > > >   File
> > > "/usr/local/ccpnmr/ccpnmr1.0/python/ccpnmr/analysis/Analysis.py", line 870, in finishInitSpectrum
> > > >     self.initSpectrumPeakList(spectrum)
> > > >   File
> > > "/usr/local/ccpnmr/ccpnmr1.0/python/ccpnmr/analysis/Analysis.py", line 918, in initSpectrumPeakList
> > > >     Nmr.PeakList(spectrum, details = 'Default list')
> > > >   File "/usr/local/ccpnmr/ccpnmr1.0/python/ccp/api/Nmr.py", line
> > > -11377, in __init__
> > > >   File
> > > "/usr/local/ccpnmr/ccpnmr1.0/python/ccpnmr/analysis/Analysis.py", line 1265, in initPeakList
> > > >     view = window.findFirstSpectrumWindowView(dataSource=spectrum)
> > > >   File
> > > "/usr/local/ccpnmr/ccpnmr1.0/python/ccpnmr/api/Analysis.py", line
> > > 13814, in findFirstSpectrumWindowView
> > > >     if (getattr(v, key) == condition):
> > > >   File
> > > "/usr/local/ccpnmr/ccpnmr1.0/python/ccpnmr/api/Analysis.py", line
> > > 15635, in getDataSource
> > > >     raise
> > > ApiError("ccpnmr.Analysis.SpectrumWindowView.getDataSource:">
> > > ApiError: ccpnmr.Analysis.SpectrumWindowView.getDataSource: No
> > > object found for mandatory derived link using key[9, 1]
> > > >
> > > > After a while I quit Analysis and saved my project. When trying
> > > to open it again the project file was corrupted and I got the
> > > following error message:
> > > >
> > > > "Project invalid, please quit, fix and restart:
> > > ccpnmr.Analysis.Spectrum WindowView.getDataSource: No object found
> > > for mandatory derived link using key[9, 1]"
> > > >
> > > > Quit, fix and re-start sound easy enough, but how do I do that
> > > in real life? I need my project...
> > > >
> > > > Magnus
> > > >
> > > > ----------------------------------
> > > > Magnus Helgstrand
> > > > Dept. of Biophysical Chemistry
> > > > Lund University
> > > > Box 124
> > > > SE-221 00 Lund
> > > > Sweden
> > > >
> > > > Phone: +46-46-2228173
> > > >
> > >
> >
>

Top of Message | Previous Page | Permalink

JiscMail Tools


RSS Feeds and Sharing


Advanced Options


Archives

May 2024
April 2024
March 2024
February 2024
January 2024
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
January 2004
December 2003
November 2003
October 2003
September 2003


JiscMail is a Jisc service.

View our service policies at https://www.jiscmail.ac.uk/policyandsecurity/ and Jisc's privacy policy at https://www.jisc.ac.uk/website/privacy-notice

For help and support help@jisc.ac.uk

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager