Don't worry about the progress bar - self.total should never be zero
anyway so it's quite nice that it falls over when junk is being passed in.
The underlying problem is that a peak list without any picked peaks was
used for generating distance constraints. This is now checked and
appropriate warnings are flagged up. I have posted a patch.
Tim
> It should propbably be:
>
> if self.total > 0:
> p = self.progress/self.total
> else:
> p = 0
>
> 2006/2/13, Brian Smith <[log in to unmask]>:
> > On Mon, 13 Feb 2006, Brian Smith wrote:
> >
> > > File "/usr/local/ccpnmr1.0.9/ccpnmr1.0/python/memops/gui/ProgressBar.py",
> > > line 95, in update
> > > p = self.progress/self.total
> > > ZeroDivisionError: float division
> >
> > A fix - dunno if it's Python-perfect - is to replace line 95 with:
> >
> > if self.progress > 0:
> > p = self.progress/self.total
> > else:
> > p = 0
> >
> >
> >
> > --
> > Dr. Brian O. Smith ---------------------- B Smith at bio gla ac uk
> > Division of Biochemistry & Molecular Biology,
> > Institute Biomedical & Life Sciences,
> > Joseph Black Building, University of Glasgow, Glasgow G12 8QQ, UK.
> > Tel: 0141 330 5167/6459/3089 Fax: 0141 330 8640
> >
>
-------------------------------------------------------------------------------
Dr Tim Stevens Email: [log in to unmask]
Department of Biochemistry [log in to unmask]
University of Cambridge Phone: +44 1223 766022 (office)
80 Tennis Court Road +44 7816 338275 (mobile)
Old Addenbrooke's Site +44 1223 364613 (home)
Cambridge CB2 1GA WWWeb: http://www.bio.cam.ac.uk/~tjs23
United Kingdom http://www.pantonia.co.uk
-------------------------------------------------------------------------------
------ +NH3CH(CH(CH3)OH)C(O)NHCH(CH(CH3)CH2CH3)C(O)NHCH(CH2CH2SCH3)CO2- -------
-------------------------------------------------------------------------------
|