I created a python script for ArcGIS Pro tool I created. It worked fine a week ago, but for some reason, it now has this error: "ERROR 032659...TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'." What does this error mean and what are some possibilities for this type of error?
Thanks ahead for your help!
It means that whatever line was trying to concatenate two things that were expecting strings and the first was "None"
a = None; b = "something"
a + str(b)
Traceback (most recent call last):
File ",,,1.py", line 1, in <cell line: 1>
a + str(b)
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
Now you can fix it without solving the None problem by using
f"{a} + {b}"
'None + something'
f"{a}{b}"
'Nonesomething'
"{}{}".format(a, b)
'Nonesomething'
You will have to figure out why the first variable isn't getting what you want