It is really frustrating at times that TypeError shows the types of the function arguments it accepts but prints the values for the types that it actually got. If the print of the value does not contain the type it is hard to diagnose the exact problem.
If it is in any way possible to print the types of the arguments it got instead, I believe it would be very helpful.