0
나는이 코드를 입력하면 : 나는 오류가오류 동안
import pygame.camera
pygame.camera.init()
cam = pygame.camera.Camera(pygame.camera.list_cameras()[0])
cam.start()
img = cam.get_image()
import pygame.image
pygame.image.save(img, "photo.bmp")
pygame.camera.quit()
을 :하지만 난 .... 불을 내 웹캠 빛을 볼 수
Traceback (most recent call last):
File "C:\Users\ibrahim\Desktop\Bill2.py", line 7, in <module>
pygame.image.save(img, "photo.bmp")
TypeError: must be pygame.Surface, not None
역 추적 (마지막으로 가장 최근 통화) : 파일 "C : \ 사용자 \ 이브라힘 바탕 화면 \ 파이썬 \의 transpose.py \" pygame.image.save에서, 라인 (9), (IMG, "photo.bmp") TypeError : pygame.Surface 여야하며 None이 아닙니다.이 오류가 발생합니다. –