I was working on a function that setup IK handles and I got this error message:
Invalid arguments for flag ‘startJoint’. Expected string, got [ unicode ] #
It turns out that even though the item being passed to the ikHandle() command was not specified as being a list, that is how it was being read.
This may be something peculiar in python, it seems that python may treat anything added to a selection as an array item even if the item is a single object. Oddly, I believe this is the first time I have encountered this, so it actually may be something peculiar to the IkHandle() command.
At any rate you get around it by simply treating the object as the first item in a list: objectShare