olemb / dbfread

Read DBF Files with Python
MIT License
224 stars 91 forks source link

ValueError: could not convert string to float: b'60.00\x00\x00' #69

Closed thalibarrifqi closed 1 year ago

thalibarrifqi commented 1 year ago

Traceback (most recent call last): File "", line 1, in File "/home/btx/Python/btx-venv/lib/python3.10/site-packages/dbfread/dbf.py", line 314, in _iter_records items = [(field.name, File "/home/btx/Python/btx-venv/lib/python3.10/site-packages/dbfread/dbf.py", line 315, in parse(field, read(field.length))) \ File "/home/btx/Python/btx-venv/lib/python3.10/site-packages/dbfread/field_parser.py", line 79, in parse return func(field, data) File "/home/btx/Python/btx-venv/lib/python3.10/site-packages/dbfread/field_parser.py", line 174, in parseN return float(data.replace(b',', b'.')) ValueError: could not convert string to float: b'60.00\x00\x00'

thalibarrifqi commented 1 year ago

I was able to solve the problem by reference to this solution https://github.com/olemb/dbfread/issues/20#issuecomment-490289235 thank you to pbrn46