Python、OpenCV、Raspberry Pi-3 - 属性错误 - 'NoneType' 对象
Python, OpenCV, Raspberry Pi-3 - Attribute Error - 'NoneType' object
我一直遇到 AttributeError: 'NoneType' object has no attribute 'shape'
回溯(最近调用最后):
File "/home/pi/ball-track/ball_tracking.py", line 52, in <module>
frame = imutils.resize(frame, width=600)
File "/usr/local/lib/python2.7/dist-packages/imutils/convenience.py", line 45, in resize
(h, w) = image.shape[:2]
AttributeError: 'NoneType' object has no attribute 'shape'
对于遇到相同问题的任何人,我已通过键入以下命令解决了错误:
sudo modprobe bcm2835-v4l2
我一直遇到 AttributeError: 'NoneType' object has no attribute 'shape'
回溯(最近调用最后):
File "/home/pi/ball-track/ball_tracking.py", line 52, in <module>
frame = imutils.resize(frame, width=600)
File "/usr/local/lib/python2.7/dist-packages/imutils/convenience.py", line 45, in resize
(h, w) = image.shape[:2]
AttributeError: 'NoneType' object has no attribute 'shape'
对于遇到相同问题的任何人,我已通过键入以下命令解决了错误:
sudo modprobe bcm2835-v4l2