在pycharm中运行出现以下问题

在pycharm中进行手势识别时调用这个函数contours.sort(key = cnt_area, reverse=True)

然后报错,出现这个问题

AttributeError: 'tuple' object has no attribute 'sort'
不知道哪里出了问题

contours没有sort这个方法,进去看看有没有

你这个contours是个元组,没有sort方法
你检查下你的代码是否有地方重新赋值了contours