Hi all,
just encountered a problem with akhet's create_db script which had me
scratching my head for quite some time: I use the script to create the
tables and then populate the db. This worked fine with sqlite, but
when switching to postgresql, it always failed with
sqlalchemy.exc.InternalError: (InternalError) current transaction is
aborted, commands ignored until end of transaction block

After some tial and error I found the following fix: Starting a new
transaction after the tables are created and before getting a session,
like so

    models.Base.metadata.create_all()
    transaction.commit()
    transaction.begin()
    sess = models.Session()

While this fixes my problem I have no clue whether this is the
recommended way or whether I'm doing something entirely wrong.
best regards,
robert

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to