PS:

The only thing I can think of that is not quite usual is that I have a save method on my models and that calls flush() on the session object.

and the session is created using:

DB = scoped_session(sessionmaker(extension=ZopeTransactionExtension()))


Thanks.
AM


On 12/18/2013 09:35 PM, AM wrote:
Hi All.

I have a pyramid app, that uses sqlite via sqlalchemy when run in
development.

The configuration used:

sqlalchemy.url = sqlite:///%(here)s/pyp.sqlite?pool_size=1
sqlalchemy.isolation_level = SERIALIZABLE

The application initializes the engine using:

     settings = config.get_settings()
     engine = sa.engine_from_config(settings, 'sqlalchemy.')
     DB.configure(bind=engine)
     BASE.metadata.bind = engine


Another part of the application that runs as a daemon also uses the same
setup. This daemon always starts after the app. The daemon initializes
the engine using the same piece of code.

When the application tries to insert a record in the database I get the
following error:

OperationalError: (OperationalError) database is locked

I am fairly certain I had this working previously quite some time back
but for the life of me cannot remember how.

Any help would be greatly appreciated.

Thanks.
AM

--
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/groups/opt_out.

Reply via email to