当我尝试在python shell上运行我的代码时,我得到了以下内容: Attributeerror:'picamera'对象没有属性'capature' 请帮忙
import time
import picamera
with picamera.PiCamera() as camera:
camera.resolution = (1024, 768)
camera.start_preview()
# Camera warm-up time
time.sleep(2)
camera.capture('foo.jpg')
答案 0 :(得分:0)
在picamera网站的配方中,第5行到第9行是缩进的,因为它们是python'with'语句的一部分。
建议您检查代码是否缩进和正确。您的错误消息有拼写错误。