Open GoogleCodeExporter opened 8 years ago
Original comment by jlawh...@geospatialpython.com
on 13 Apr 2012 at 3:54
Hi, I am also seeing that bug,
attached as zip is my shape file.
Original comment by nahu...@gmail.com
on 29 Jul 2012 at 11:23
Attachments:
One more comment, my shapefile was created Python GDAL.
The dbf is normally read with programs like QGIS.
Original comment by nahu...@gmail.com
on 29 Jul 2012 at 11:26
The error response I got was a bit more helpful:
ValueError: invalid literal for int() with base 10: '1.487983'
The int() function is being sent the string '1.487983', and it throws an
exception (at least it does in Python 2.7).
I patched the problem by changing line 378 from:
value = int(value)
to:
value = int(float(value))
Original comment by da...@davel.org
on 31 Mar 2013 at 8:51
Can confirm, receiving same error but for a different reason. NULL records show
up as asterisks "****" as wide as the field. I patched it as
try:
value = int(float(value))
except:
value = None
Original comment by rexdougl...@gmail.com
on 31 Oct 2013 at 11:47
I encountered this issue too, with NULL values in the DBF being shown as
asterisks '*********'.
Shapefile was created in QGIS.
I used rexdouglas's fix, so I can recommend it.
Original comment by timothy....@gmail.com
on 23 Dec 2013 at 2:16
Original issue reported on code.google.com by
127.0.0.69
on 21 Mar 2012 at 4:03Attachments: