I am creating a model which will give me two string values, one which reads exactly what is in a field and another which automatically replaces any Space with an "_". I have used Calculate Value tool, and entered in the following:
def ReplaceName(name): return name.replace(" ", "_")
The result is an error:
ERROR 000539: Error running expression: ReplaceName(NoSpace1) Traceback (most recent call last): File "<expression>", line 1, in <module> NameError: name 'NoSpace1' is not defined
I suspect because not all my Values have spaces
How can I make this work?