In sqlite, when you create an autoincremented key, a sqlite_sequence table is created automatically. The problem is that this table has no primary key making sqlalchmey and sqlautocode fail with "sqlalchemy.exc.ArgumentError: Mapper Mapper|Temporal|sqlite_sequence could not assemble any primary key columns for mapped table 'sqlite_sequence'".
The bigger problem is, however, that when you're trying to generate a declarative model (using the -d flag), the table filtering option is not working - or more accurately is not even handled.
Simple schema:
CREATE TABLE builds (
id INTEGER PRIMARY KEY AUTOINCREMENT,
repository TEXT,
revision TEXT,
);
And try:
sqlautocode -d -t builds sqlite:///builds.db
I've attached a superficial fix for whoever needs it (python 2.6)