Traceback (most recent call last):
File "C:\Users\asus\Google Drive\Miroir intelligent\code\Reconnaissance faciale\PyFaceRec-master\SimpleFaceRecognition\simple_face_recognition.py", line 58, in
recognizer = cv2.face.createFisherFaceRecognizer()
AttributeError: module 'cv2.cv2' has no attribute 'face'
collector = cv2.face.StandardCollector_create()
Related
C:\Users\KrunkCiti\AppData\Local\Programs\Python\Python310\Scripts>python OpenGLTensorGrowth.py
Traceback (most recent call last):
File "C:\Users\KrunkCiti\AppData\Local\Programs\Python\Python310\Scripts\OpenGLTensorGrowth.py", line 29, in
Dict = Canvas.winfo_pixels(info, 3840_2160),[Self.tk.getint]
File "C:\Users\KrunkCiti\AppData\Local\Programs\Python\Python310\lib\tkinter_init_.py", line 1163, in winfo_pixels
return self.tk.getint(
AttributeError: 'function' object has no attribute 'tk'
import csv
data = csv.reader(open('spy.csv'),delimiter=';')
lista = []
for fila in data:
lista.append(fila)
this is the error:
PS C:\Users\User\Desktop\primer proyecto> & C:/Users/User/AppData/Local/Microsoft/WindowsApps/python3.9.exe "c:/Users/User/Desktop/primer proyecto/FINANZAS/csv.py"
Traceback (most recent call last):
File "c:\Users\User\Desktop\primer proyecto\FINANZAS\csv.py", line 1, in <module>
import csv
File "c:\Users\User\Desktop\primer proyecto\FINANZAS\csv.py", line 6, in <module>
data = csv.reader(open('spy.csv'),delimiter=';')
AttributeError: partially initialized module 'csv' has no attribute 'reader' (most likely due to a circular import)
PS C:\Users\User\Desktop\primer proyecto>
I'm pretty new to python and this code is for object detection, it works fine on my webcam but has an error when using an external camera
This is what I have:
for classId, confidence,box in zip(classIds.flatten(),confs.flatten(),bbox):
cv2.rectangle(img,box,color=(0,255,0),thickness=2)
cv2.putText(img,classNames[classId-1].upper(),(box[0]+10,box[1]+30),
cv2.FONT_HERSHEY_COMPLEX,1,(0,255,0),2)
Here's the message I got:
Traceback (most recent call last):
File "C:/Users/byeo9/PycharmProjects/FYP-ENV/Testing 2.py", line 31, in <module>
for classId, confidence,box in zip(classIds.flatten(),confs.flatten(),bbox):
AttributeError: 'tuple' object has no attribute 'flatten'
I just started using OpenCV 3.0 in python. I am trying one of the example "didgits.py" and I am getting the Attribute error:
Traceback (most recent call last):
File "C:\Users\Arpit Jindal\Desktop\opencv\sources\samples\python2\digits.py", line 171, in <module>
model = KNearest(k=4)
File "C:\Users\Arpit Jindal\Desktop\opencv\sources\samples\python2\digits.py", line 77, in __init__
self.model = cv2.KNearest()
AttributeError: 'module' object has no attribute 'KNearest'
Then I commented the code for KNearest and tried for SVM only and again I got the Attribute error:
Traceback (most recent call last):
File "C:\Users\Arpit Jindal\Desktop\opencv\sources\samples\python2\digits.py", line 177, in <module>
model = SVM(C=2.67, gamma=5.383)
File "C:\Users\Arpit Jindal\Desktop\opencv\sources\samples\python2\digits.py", line 89, in __init__
self.params = dict( kernel_type = cv2.SVM_RBF,
AttributeError: 'module' object has no attribute 'SVM_RBF'
I tried to search for these variable in OpenCV but couldn't find anything.
Are the python examples not updated? Where can I find the complete list of python API's and reference manual for OpenCV3.0 python, as the online docs is not complete for Machine Learning because I found many python API mentioned in 2.4.9 but not in 3.0?
I already checked all similar thread, but no help.
>>> from nltk import load_parser
>>> parser = load_parser('grammars/book_grammars/drt.fcfg', logic_parser=nltk.sem.drt.DrtParser())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'DrtParser'
code is given at : http://www.nltk.org/book/ch10.html just above 5.2
>>> print nltk.sem.drt
<module 'nltk.sem.drt' from '/usr/local/lib/python2.7/dist-packages/nltk/sem/drt.pyc'>
what can be the issue?
/nltk/sem has drt.py and drt.pyc files