Ok I am having a problem with a python code block. It works for about 1300 rows and then fails without error. The calculate field tool runs for 15-20 minutes and then without returning any error returns to the shell. The problem is stopping the whole script without giving any sort of error. Also it seems to be skipping value.replace(\"'\",'') though I think that the need to escape those two " are confusing the GP. Perhaps there is a better way to convert a string to a set
expression='getvalue(!parce_test_spatial_join.FLD_ZONE!)'
codeblock="def getvalue(string):\n\
valuelist=string.split(',')\n\
valueset=set(valuelist)\n\
value=str(valueset)[5:-2]\n\
value.replace(\"'\",'')\n\
return value"
I am thinking of replacing the whole code block with this but I still have to escape those quotes or python gets mad.
codeblock="def(string):\n\
value=str(set(string.split(','))).replace(\"'\",'')[5:-2]\n\
return value"