You may encounter this error when using OpenCV with Python bindings, while trying to use the rectangle structure.
Here is an example :
You will get this result:
The answer is pretty simple, you have to set rect as a tuple and not a list:
There it is, pretty simple, isn’t?!
I still lost 15 minuts searching for it yesterday ^^, won’t do it twice :D
A small warning however, the values of the tuple can’t be changed once initialized !
See ya