2014-02-19 65 views
0

當我嘗試運行我的蟒蛇shell代碼我得到如下: AttributeError的:「picamera」對象有沒有屬性「capature」 請幫助attributeeeror:樹莓PI OpenCV的蟒蛇

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

在來自picamera網站的第5至第9行的配方縮進,因爲它們是python'with'語句的一部分。

建議您檢查代碼是否縮進並更正。您的錯誤消息有拼寫錯誤。