Hello,
This is an ordering issue. The spectrum has been created and is going
about finishing its job. One job is to create a hook to the C world (that
is the reference to 'block_file' below). Another job is to create a
default peaklist. You might have thought these two jobs had nothing to do
with each other. But as it happens if the CalcRatePopup is open then it
can happen (although I haven't managed to create the set of circumstances
where it happens to me) that that module asks for a noise estimate for the
spectrum, for which it goes down to the C world. So there is a problem if
the peaklist job happens before the block_file job in this one
circumstance (because the peaklist job needs the hook to the C world to be
in place). So the way to fix this is to swap the two jobs (and I think
that this swap doesn't create its own problems). This will be fixed in
the next release but for now you can go into:
ccpnmr1.0/python/ccpnmr/analysis/Analysis.py
and in the function finishInitSpectrum() swap the two lines from
self.initSpectrumPeakList(spectrum)
self.initBlockFile(spectrum)
to the opposite
self.initBlockFile(spectrum)
self.initSpectrumPeakList(spectrum)
Wayne
On Fri, 18 Mar 2005, Mark Pfuhl wrote:
> This comes completely out of the blue - I have loaded quite a few spectra
> previously but now I get this when I try to open a spectrum (I did this with
> standard azara format spectra that I have loaded before; this happens both
> on SuSE 9.0 and RedHat enterprise):
>
>
> CCPNMR Analysis Version 1.0. Release 1 (Copyright 2003-2004 CCPN)
> Distribution created Fri Mar 18 16:57:21 2005
> >>> Spectrum successfully opened
> Exception in Tkinter callback
> Traceback (most recent call last):
> File "/home/mp84/ccpnmr/python2.2/lib/python2.2/lib-tk/Tkinter.py", line
> 1316, in __call__
> return apply(self.func, args)
> File
> "/home/mp84/ccpnmr/ccpnmr1.0/python/ccpnmr/analysis/OpenSpectrumPopup.py",
> line 191, in openSpectra
> self.parent.finishInitSpectrum(spectrum)
> File "/home/mp84/ccpnmr/ccpnmr1.0/python/ccpnmr/analysis/Analysis.py",
> line 870, in finishInitSpectrum
> self.initSpectrumPeakList(spectrum)
> File "/home/mp84/ccpnmr/ccpnmr1.0/python/ccpnmr/analysis/Analysis.py",
> line 918, in initSpectrumPeakList
> Nmr.PeakList(spectrum, details = 'Default list')
> File "/home/mp84/ccpnmr/ccpnmr1.0/python/ccp/api/Nmr.py", line -11377, in
> __init__
> File
> "/home/mp84/ccpnmr/ccpnmr1.0/python/ccpnmr/analysis/CalcRatesPopup.py", line
> 626, in updatePeakLists
> self.peakListPulldown.setup(names,
> names.index(self.getPeakListName(self.peakList)) )
> File "/home/mp84/ccpnmr/ccpnmr1.0/python/memops/gui/PulldownMenu.py", line
> 167, in setup
> self.setSelectedIndex(selected_index)
> File "/home/mp84/ccpnmr/ccpnmr1.0/python/memops/gui/PulldownMenu.py", line
> 304, in setSelectedIndex
> self.callback(selected_index, self.entries[selected_index])
> File
> "/home/mp84/ccpnmr/ccpnmr1.0/python/ccpnmr/analysis/CalcRatesPopup.py", line
> 610, in changePeakList
> self.noise = getNoiseEstimate(self.peakList.dataSource, nsamples =
> 10000, nsubsets = 10, fraction = 0.1)
> File "/home/mp84/ccpnmr/ccpnmr1.0/python/ccpnmr/analysis/Util.py", line
> 1461, in getNoiseEstimate
> raise 'dataSource does not have attribute "block_file"'
> dataSource does not have attribute "block_file"
>
|