On Fri, Mar 13, 2015 at 3:45 PM, Adam Watson <adamcwatso...@gmail.com> wrote: > I recently posted a question on stack overflow regarding an Integrity Error > when using sqlalchemy core. I'd really appreciate it if anyone could read it > and help me figure it out: > http://stackoverflow.com/questions/29036357/sqlalchemy-core-integrity-error >
First, are you sure the table is empty before you start? Entries from previous import attempts might trigger this error. Second, what happens if you insert each row separately? ie. insert = Attributes.__table__.insert() for attr in attrList: stmt = insert.values({{'obj_id' : attr['obj_id'], ...}) self.engine.execute(stmt) Simon -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.