Dear Matthias,
I think a return was missing from Rasmus's mail. The code should be:
from memops.format.xml import XmlIO
filePath = '/home/...' # the path of your project xml file
project = XmlIO.loadProjectFile(filePath, partialLoad=True)
project.saveModified()
Regards,
Magnus
On 09/05/12 11:28, Rasmus Fogh wrote:
> Dear Matthias,
>
> The problem is that ExpPrototype 274 no longer exists, but that the
> shell pointing to it is still in the root file. It is possible to
> avoid this by telling the program to skip these TopObjetc shells on
> loading. Wayne and I will have to look at how to avoid this problem
> for the future. For a quick fix now, try this:
>
> First determine the full path file name of the project root xml file
> (.../projName/memops/Implementation/???.xml). Then open Analysis
> without opening a project, and execute the following commands in the
> command line window:
>
> from memops.format.xml import XmlIO
> filePath = '/home/...' # the path of your project xml file project =
> XmlIO.loadProjectFile(filePath, partialLoad=True)
> project.saveModified()
>
> Then close Analysis and try working normally again.
>
> Yours,
>
> 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 Wed, 9 May 2012, Matthias Huber wrote:
>
>> Dear all,
>>
>> I imported a new spectrum into my project and want to set its
>> experiment type. The Experiment:Experment Types panel stays
>> completely empty though (also the old experiments that have a type
>> set do not show up anymore). Why could that be?
>> I get the attached error message in the shell.
>>
>> Thanks for your help!
>> Matthias
>>
>>
>>
>>
>>> ~$ analysis
>>> Model read finished. Duration 2.19822907448
>>> Model validity check skipped
>>> CcpNmr Analysis Version 2.2. Release 2 (Copyright 2003-2010 CCPN)
>>> Distribution created Tue Mar 13 16:28:53 2012
>>>
>>> If you use CcpNmr Analysis, please quote the following reference:
>>>
>>> Wim F. Vranken, Wayne Boucher, Tim J. Stevens, Rasmus H. Fogh, Anne
>>> Pajon, Miguel Llinas, Eldon L. Ulrich, John L. Markley, John Ionides
>>> and Ernest D. Laue (2005). The CCPN Data Model for NMR Spectroscopy:
>>> Development of a Software Pipeline. Proteins 59, 687 - 696.
>>>
>>> A copy of the in-program documentation is located at:
>>> http://www.ccpn.ac.uk/documentation/
>>>
>>> For how-tos and FAQs visit the CCPN wiki site at:
>>> http://www.ccpn.ac.uk/wiki/
>>>
>>> To report bugs use the bug tracker at:
>>> http://www.ccpn.ac.uk/bugs/
>>>
>>> For help and support join the mailing list at:
>>> http://www.ccpn.ac.uk/support/
>>>
>>> For Python API documentation, tutorials and CCPN web applications
>>> visit:
>>> http://www.ccpn.ac.uk/
>>>
>>>>>> Registered (Matthias Huber, ETH Zurich, [log in to unmask])
>>> start generating output : ccpnmr.Analysis.AnalysisProject
>>> start generating output : ccp.general.Method.MethodStore
>>> start generating output : ccp.molecule.MolSystem.MolSystem
>>> start generating output : ccp.general.DataLocation.DataLocationStore
>>> start generating output : ccp.nmr.Nmr.NmrProject
>>> start generating output : memops.Implementation.MemopsRoot
>>> successfully saved project
>>> Spectrum successfully opened
>>> Exception in Tkinter callback
>>> Traceback (most recent call last):
>>> File
>>> "/Users/mahu/bin/ccpnmr222/python2.6/lib/python2.6/lib-tk/Tkinter.py",
>>> line 1410, in __call__
>>> return self.func(*args)
>>> File
>>> "/Users/mahu/bin/ccpnmr222/python2.6/lib/python2.6/lib-tk/Tkinter.py",
>>> line 495, in callit
>>> func(*args)
>>> File
>>> "/Users/mahu/bin/ccpnmr222/ccpnmr2.2/python/ccpnmr/analysis/popups/EditExperiment.py",
>>> line 1832, in updateExpTypes
>>> altTypes, altRefExps = self.getFullTypes(experiment)
>>> File
>>> "/Users/mahu/bin/ccpnmr222/ccpnmr2.2/python/ccpnmr/analysis/popups/EditExperiment.py",
>>> line 1395, in getFullTypes
>>> names = [(rx.name, rx) for rx in getRefExperiments(experiment)
>>> File
>>> "/Users/mahu/bin/ccpnmr222/ccpnmr2.2/python/ccpnmr/analysis/core/ExperimentBasic.py",
>>> line 1264, in getRefExperiments
>>> return getFilteredRefExperiments(experiment, category=category)
>>> File
>>> "/Users/mahu/bin/ccpnmr222/ccpnmr2.2/python/ccpnmr/analysis/core/ExperimentBasic.py",
>>> line 1195, in getFilteredRefExperiments
>>> for refExperiment in getPossibleRefExperiments(experiment,
>>> category):
>>> File
>>> "/Users/mahu/bin/ccpnmr222/ccpnmr2.2/python/ccpnmr/analysis/core/ExperimentBasic.py",
>>> line 1150, in getPossibleRefExperiments
>>> for x in y.sortedRefExperiments()]
>>> File
>>> "/Users/mahu/bin/ccpnmr222/ccpnmr2.2/python/ccp/api/nmr/NmrExpPrototype.py",
>>> line 10712, in sortedRefExperiments
>>> self.load()
>>> File
>>> "/Users/mahu/bin/ccpnmr222/ccpnmr2.2/python/memops/api/Implementation.py",
>>> line 25421, in load
>>> raise ApiError('No active repository found for TopObject %s' %
>>> self)
>>> ApiError: No active repository found for TopObject
>>> <ccp.nmr.NmrExpPrototype.NmrExpPrototype [274]>
>>
|