From: alexander s. <al...@ty...> - 2007-01-12 11:20:07
|
Helmut Jarausch wrote, at 11.01.2007 22:13: > > I get exceptions for some float fields > I had to apply the following patch > > --- fields.py.org 2007-01-11 20:45:31.000000000 +0100 > +++ fields.py 2007-01-11 20:48:46.000000000 +0100 > @@ -214,7 +214,7 @@ > value = value.strip() > if self.decimalCount > 0: > # a float (has decimal digits) > - if value: > + if value and value != '.': > return float(value) > return 0.0 > else: thank you for reporting that. i wonder how such values got to your dbf file? it seems to be impossible to enter strings like that with foxpro user interface. perhaps Dbf objects should have an option to ignore all conversion errors... > Thanks for your work on dbfpy, not at all. best wishes, alex. |