I'm actually reporting 2 problems. Both were found on the images blog from chapter 3 of the book. Both have to do with the shell. 1. This happens when I use web2py.py -S images >>> db Traceback (most recent call last): File "<console>", line 1, in <module> NameError: name 'db' is not defined 2. This happens when I use the interactive shell from the admin panel: In[17]:
db().select(db.image.ALL) Out[17]: Traceback (most recent call last): File "<input>", line 1, in <module> File "/home/guruyaya/python/web2py/gluon/sql.py", line 3216, in select rows = response(query) File "/home/guruyaya/python/web2py/gluon/sql.py", line 3211, in response db._execute(query) File "/home/guruyaya/python/web2py/gluon/sql.py", line 947, in <lambda> self._execute = lambda *a, **b: self._cursor.execute(*a, **b) ProgrammingError: Cannot operate on a closed database. The images blog was copied without any changes on both. Needless to say, similar things happen on other applications I use. Any idea?