From: Ian B. <ia...@co...> - 2004-04-26 15:56:42
|
Marek Kubica wrote: > On Mon, 26 Apr 2004 07:10:37 -0400 > Scott Russell <sc...@to...> wrote: > > >>On Mon, 2004-04-26 at 07:08, Marek Kubica wrote: >> >>>Trying to run it: >>>File "C:\sqlobject\sqlobject\main.py", line 943, in dropTable >>> if ifExists and not cls._connection.tableExists(cls._table): >>>AttributeError: 'NoneType' object has no attribute 'tableExists' >>> >>>That doesn't wonder. But where in sqlite can I find tableExists? >>> > > >>First, you need to read your error. This is a basic python error, >>stating that your code is trying to call a method of None, of which >>none exist. Something failed to initialize. > > In my file there is a line > gadfly = None > but in the sqlite file it's the same > sqlite = None This is for lazy loading -- you'll note that SQLiteConnection imports sqlite in its __init__. But you're probably encountering a more mundane problem where you aren't giving your SQLObject subclass a _connection object, so the connection is simply None. Ian |