Faculty of Engineering and Mathematical Sciences 
Not logged in (login)

help3403


This forum is provided to promote discussion amongst students enrolled in Agile Web Development (CITS3403).
 
Options:
RSS cloud
Jump to:

Error printing column values from table query

1 of 419 articles shown, currently no other people reading this forum.
photo
From: Haolin W.
Date: Mon 25th May 2020, 3:49pm
Actions: 
        Login-to-reply

 

Why are you trying to iterate over the query object? What exactly are you trying to do?

ANONYMOUS wrote:

> When I try to print values from a column "s" in a table "statement" by iterating over a Session.Query object returned by Session.query(statement), I get the following error:
> 
> "(sqlite3.IntegrityError) UNIQUE constraint failed: statement.s
>  [SQL: INSERT INTO statement (s) VALUES (?)]
>  [parameters: ('Test statement.',)]
>  (Background on this error at: https://sqlalche.me/e/gkpj)"
> 
> Does anyone know what's causing this error?

Related articles

Error printing column values from table query (all 3) RSS
├─ original   Mon 25th May 2020, 2:06pm, ANONYMOUS
├─ THIS   Mon 25th May 2020, 3:49pm, Haolin W.
└─ reply 2   Mon 25th May 2020, 5:02pm, Timothy F.
This Page


Program written by: [email protected]
Feedback welcome
Last modified: 11:27am Sep 21 2020