Help appreciated. This is the error i get after executing the code. i use openpyxl 3.0.3 [closed]
Code:
for row in range(2, (len(sheet.columns[0]) + 1)):
rno = sheet.cell('A%s'% row).value
if rno is not None:
rno = rno[-2:]
if attend[int(rno)] != 0:
col = getDateColumns()
sheet['%s%s' % (col, str(row))]=1
The Error i get is:-
Enter Subject: SQA
Success
Frame2. 1 face detected and 0 faces recognized
Traceback (most recent call last):
File "C:\Users\ACER\Desktop\PROJECT ALL RESOURCE\PROJECT ALL RESOURCE\Implementation\PYTHON FILES\facerecognition.py", line 92, in <module>
for row in range(2, (len(sheet.columns[0]) + 1)):
TypeError: 'generator' object is not subscriptable
The
sheet.columns
is generator. So uselist
,next
,np.float
,itertools
,np.array
etc. It should be like thisfor row in range(2, (list(sheet.columns)[0] + 1)):
I cannot test it for you because you're using older version 3.0.3Sir, the pypi.org also says openpyxl latest version is 3.0.3 and you say it is oldest. If yes, please tell from where shall I download the new version
Here is link( OpenCV 4.2.0
OpenCV is 4.2.0 which I use. I use openpyxl 3.3.0 which is latest version
I am not familiar with openpyxl 3.3.0.