获取“AttributeError: 'NoneType' 对象没有属性 'copy'”

时间:2021-07-15 13:31:43

标签: types error-handling attributes copy syntax-error

AttributeError                            Traceback (most recent call last)
<ipython-input-32-2d1efe7a2e13> in <module>()
      6 while True:
      7     ret, frame = cam.read()                                         # Membaca setiap frame dari stream kamera
----> 8     frame_copy = frame.copy()                                       # Copy frame
      9     gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)                  # Mengubah mode BGR ke GRAY (hitam putih)
     10 

AttributeError: 'NoneType' object has no attribute 'copy'

0 个答案:

没有答案