lundi 14 août 2023

How do i solve this: sqlite3.ProgrammingError: Error binding parameter 1: type 'list' is not supported

Im doing a password generator and when i try to put the data from the variable password into the db i get this error, idk why im getting this. im using pysimplegui to build the interface . Can someone help me pls? im a beginner. the code is this

lower = "abcdefghijklmnopqrstuvwxyz"
    upper = lower.upper()
    numbers = "0123456789"
    symbols = "@"

    all = lower + upper + numbers + symbols
    length = int(ipt['crt'])
    
    password ="".join(random.sample(all, length))
    pc.copy(password)
    tb = ipt['site']
    tbb = [tb]
    cur.execute("INSERT INTO senhas(site, senha) VALUES(?, ?)",( tbb, password))
    print(tb)

the ipt's are the inputs that i made.

im trying to get this error solved so i can move on to finish the project.




Aucun commentaire:

Enregistrer un commentaire