Getting not enough values to unpack when unpacking tuple | بلاگ

Getting not enough values to unpack when unpacking tuple

تعرفه تبلیغات در سایت

آخرین مطالب

امکانات وب

Vote count: 0

Im trying to unpack this tuple but keep getting this error:

File "C:/Users/erez2/PycharmProjects/DataRestorProject/", line 374, in send for rowid, document, preview, visibility in (data): ValueError: not enough values to unpack (expected 4, got 1)

    if documentList and documentList!="Missing Word" and documentList!="empty" and documentList!="Stop list word" and isAdmin==0:
    for document in documentList.split(","):
        if document:
            row_id +=1
            query.execute("select name,short_vers,invisible from documents where id="+document_id)
            alreadyExist = 0
            for documentCheck in data:
                if newDocumentFount[0][1]==documentCheck[1]:
            if results[0][2]==0 and alreadyExist==0:
                data=data +newDocumentFount

widgets = {}

row = 3
if data and isAdmin==0:
    for rowid, document, preview, visibility in (data):
        row += 1
        widgets[rowid] = {
            "rowid": Button(table, text=rowid,borderwidth=2, relief="solid",command=lambda:openDocument(document,cnx)),
            "Document": Button(table, text=document,borderwidth=2, relief="solid",command=lambda:openDocument(document,cnx)),
            "Preview": Button(table, text=preview,borderwidth=2, relief="solid",command=lambda:openDocument(document,cnx))
        widgets[rowid]["rowid"].grid(row=row, column=0, sticky="nsew")
        widgets[rowid]["Document"].grid(row=row, column=1, sticky="nsew")
        widgets[rowid]["Preview"].grid(row=row, column=2, sticky="nsew")

Thank you for your help, Erez

asked 1 min ago
Erez Geva

نویسنده : استخدام کار بازدید : 5 تاريخ : يکشنبه 5 فروردين 1397 ساعت: 5:27