|
From: Dennis F. <Den...@te...> - 2008-09-15 14:12:21
|
Hello, I've been using DBFPy for a project I'm finishing at work. I've recently encountered a difficulty with reading a field that is defined as a double, but has zero decimal places of precision. DBFPy should treat it as a float or force it to be an integer. I cannot change the original data because the data is produced elsewhere. The error message I receive is: ValueError: invalid literal for int() with base 10: '3320.' As a work around, I altered line 243 in fields.py from return int(value) to return int(float(value)) I'm not sure what the best way to handle this case actually is, but this way works for me. Is there any chance that the code could be updated to include an update for this case? Thanks! Dennis ======================= Dennis Follensbee Software Engineer ======================= 1.800.331.7881 x1721 twiki.teleatlas.com/DennisFollensbee <http://twiki.teleatlas.com/twiki/bin/view/Main/DennisFollensbee> "Simple things should be easy. Hard things should be possible." -Larry Wall ======================= |