on-internet
← Community

int object has no attribute __getitem__

Stack Overflow ·

I am working on some code to recognises the face and speak someone's name. I am working this code in raspberry pi 3 with opencv 3.1 and python 2.7. This code works fine on windows but when I try it on raspberry, it gives an error: Type error: 'int' object has no attriibute '__getitem__' For the line: if prediction[1]<100: Full code: import cv2, sys, numpy, os, pyttsx, time,picamera haar_file = 'haarcascade_frontalface_default.xml' datasets = 'datasets' engine = pyttsx.init() rate = engine.getProperty('rate') engine.setProperty('rate', rate-40) print('Training...') # Create a list of images and

Comments

Sign in or sign up to comment and upvote.

No comments yet.