Try (str(str(setcourse)))
Putting the str in a second time sometimes works as it would appear that the original str sometimes get ignored.
Why, I don’t know but I’ve used this trick myself a few times now.