Closed MikeMillerGIS closed 7 years ago
So, in a value map on a double field, when there is a null value and that is not mapped and other is not specified, it uses the whitespace of otherwise and trys to set that.
width:None #40
sideslope:None #41
maxopdis:
#42
diameter:None #43
Normally the ValueMap otherwise value should be set to None so the Xml empty string issue does not happen. If that value is not present and the Xml file is saved externally to Pro then this can happen. I have tried to catch this as follows:
if not found:
if str(otherwise) != "None" or otherwise == None:
if otherwise.startswith("\n ") or otherwise == "":
otherwise = None
newValue = otherwise
In my experience that empty string startswith a newline char, we can always change the logic but I did some testing and this appeared to work in my small test case with: <Otherwise> </Otherwise> in the xml file.
Closing, I believe the root cause was an edited xml file. New files do not have this issue
unable to cast maxopdis to Double : '