Ask Your Question

Revision history [back]

Help appreciated. This is the error i get after executing the code. i use openpyxl 3.0.3

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

Help appreciated. This is the error i get after executing the code. i use openpyxl 3.0.3

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

str(row))]=1

The Error i get is:- 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

subscriptable