What steps will reproduce the problem?
1. Load shapefile with column name that has maximum allowed number of
characters (then there is no \x00 behind the column name).
2. .index("\x00") raises ValueError
What is the expected output? What do you see instead?
Expected behaviour: read shapefile with such a column name
What version of the product are you using? On what operating system?
Latest download provided.
Please provide any additional information below.
These lines (around 250) should fix the problem (not thoroughly tested, though):
if "\x00" in fieldDesc[name]:
indx = fieldDesc[name].index("\x00")
else:
indx = len(fieldDesc[name]) - 1
fieldDesc[name] = fieldDesc[name][:indx]
replacing the line
fieldDesc[name] = fieldDesc[name][:fieldDesc[name].index("\x00")]
Original issue reported on code.google.com by marti...@gmail.com on 9 Aug 2011 at 6:42
Original issue reported on code.google.com by
marti...@gmail.com
on 9 Aug 2011 at 6:42