2
sqlite3.ProgrammingError:提供されたバインディングの数が正しくありません。現在のステートメントは1を使用し、74が指定されています
def insert(array): connection=sqlite3.connect('images.db') cursor=connection.cursor() cnt=0 while cnt != len(array): img = array[cnt] print(array[cnt]) cursor.execute('INSERT INTO images VALUES(?)', (img)) cnt+= 1 connection.commit() connection.close() これがエラーを引き起こしている理由がわかりません。挿入しようとしている実際の文字列は74文字です。「/ gifs / epic-fail-photos-there-i-fixed-it-aww-man-the -tire-pressures-low.gif」 挿入する前にstr(array [cnt])を試しましたが、同じ問題が発生しています。データベースにはTEXT値である1つの列しかありません。 私は何時間もそこにいて、何が起こっているのか理解できません。