[Twisted-Python] SQLite3 gives error when using adbapi

sleepd sleeepd at gmail.com
Sun Apr 25 05:24:38 EDT 2010

I am try to use a in-memory sqlite db via adbapi, but sqlite gives
error:" OperationalError: *no such table*: test ".

how can I made it work?

This is my test code:

from twisted.internet import reactor
from twisted.enterprise import adbapi

def create():
    db.runOperation("create table

def insert():
    db.runOperation("insert into test(id)

def select():
    db.runQuery("""SELECT * FROM

def result(l):
    print l

def error(fail):
    print fail

db = adbapi.ConnectionPool("sqlite3", database=":memory:")
reactor.callLater(0.1, create)
reactor.callLater(1, insert)
reactor.callLater(2, select)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20100425/b18f5ada/attachment-0001.htm 

More information about the Twisted-Python mailing list