Hello,
(this may be a repost, having some technical trouble)
I was trying to run sessions2trash and getting the following error:
# python web2py.py -S init -R scripts/sessions2trash.py
web2py Web Framework
Created by Massimo Di Pierro, Copyright 2007-2011
Version 1.99.2 (2011-09-26 06:55:33) stable
Database drivers available: SQLite3, PostgreSQL, mongoDB
Traceback (most recent call last):
File "gluon/shell.py", line 206, in run
execfile(startfile, _env)
File "scripts/sessions2trash.py", line 222, in <module>
main()
File "scripts/sessions2trash.py", line 211, in main
set_db.trash()
File "scripts/sessions2trash.py", line 53, in trash
for item in self.get():
File "scripts/sessions2trash.py", line 98, in get
if tablename in db:
NameError: global name 'db' is not defined
My models are spread out across a number of different files, and
reference some modules and other files. Is it possible that one of
these conditions might trigger an error?
Thanks!