test.py doesnt fail for me, test1.py does.   not sure whats going on with it 
yet, will know today


On Apr 1, 2013, at 9:11 AM, gvv <gvver...@gmail.com> wrote:

> Hi All,
> 
> I am using 0.7.10, sqlite memory and decl_enum.py from 
> http://techspot.zzzeek.org/2011/01/14/the-enum-recipe/
> for testing.
> 
> Scenario 1 - test.py
> I am running it 8 times, 7 out of 8 it works and I get the following output:
> 0.7.10
> 1 10 Action Main /gvv
> 2 20 Action Main /gvv1
> 3 30 Menu Main Sys
> 4 10 Action Test test
> 
> 1 out of 8 I get the following error:
> sqlalchemy.exc.IntegrityError: (IntegrityError) PRIMARY KEY must be unique 
> u'INSERT INTO "MenuItem" ("Id", "TypeOfMenuItem", "ItemMenu_Id", "Line", 
> "Desc", "CreateTimeStamp", "CreateOpId_Id", "ModifiedTimeStamp", 
> "ModifiedOpId_Id") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)' ((1, 'Action', 1, 10, 
> 'Action 1', '2013-04-01 23:57:56.664654', 1, None, None), (2, 'Action', 1, 
> 20, 'Action 2', '2013-04-01 23:57:56.664667', 1, None, None), (1, 'Menu', 1, 
> 30, 'Menu', '2013-04-01 23:57:56.664674', 1, None, None))
>  
> Scenario 2 - test1.py
> I have included table ProductClass just for noise. In scenario 1 it works
> Adding index=True to ProductClass.Class:
> Class = Column(String(16), index=True, nullable=False)
> always gives me the following error:
> sqlalchemy.exc.IntegrityError: (IntegrityError) PRIMARY KEY must be unique 
> u'INSERT INTO "MenuItem" ("Id", "TypeOfMenuItem", "ItemMenu_Id", "Line", 
> "Desc", "CreateTimeStamp", "CreateOpId_Id", "ModifiedTimeStamp", 
> "ModifiedOpId_Id") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)' (1, 'Menu', 1, 30, 
> 'Menu', '2013-04-02 00:05:20.569187', 1, None, None)
> 
> What am I doing wrong?
> 
> Thank you in advance for your help.
> 
> 
> 
> 
> -- 
> 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?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  
> <decl_enum.py><test.py><test1.py>

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to