I get the error
TypeError: cannot concatenate 'str' and 'Set' objects
and the error is caused by my code
name=inst1name+'-'+setName
I know the problem is: inst1name is a set object, however this error never come up before when I run the script.
Do you know why is this? and how can I solve it?
str(inst1name)? what do you expect to happen when trying to concat a set and a str?inst1namewas a set andsetNamewas a string, you'd getunsupported operand type(s) for +: 'set' and 'str'. You getcannot concatenate 'str' and 'set' objectswhen the first argument is a string and the second argument is a set.