sqlite attribute execute is read-only sqlite attribute execute is read-only sqlite sqlite

sqlite attribute execute is read-only


You're trying to modify an attribute of the cursor. You want to call a method of the cursor.

It should be

    cur.execute('insert into user_reg (username,pwdhash,email,initial_date)\                    values (?,?,?,?)',                    [username,                     pwdhash,                     email,                     date])

Not

    cur.execute = ('insert ...


Seems to be a simple syntax error.You are trying to set a value to the command execute while you have just to call it:remove the '=' and it should be fine.