原因部分变量为空
可以print看一下变量原因
TypeErrorTraceback (most recent call last) <ipython-input-3-54e75ded8d30> in <module> 4 5 img = cv2.imread('img.jpg') ----> 6 img2 = img[:,:,::-1] 7 plt.imshow(img) TypeError: 'NoneType' object is not subscriptable
原因部分变量为空
可以print看一下变量原因
TypeErrorTraceback (most recent call last) <ipython-input-3-54e75ded8d30> in <module> 4 5 img = cv2.imread('img.jpg') ----> 6 img2 = img[:,:,::-1] 7 plt.imshow(img) TypeError: 'NoneType' object is not subscriptable