dear all,
I've added a unique field to some existing tables and w2p gave me an
error saing that he cannot add unique fields to a table so I deleted my
db and restarted as a new application but I obtained this:
ProgrammingError: Cannot operate on a closed database.
it's sufficient to comment out the property unique=True and no errors
occurs.
Here under you can find the complete traceback.
Any suggestion??
Thanks a lot
Manuele
Traceback (most recent call last):
File
"/home/manuele/Dropbox/sviluppo/web2py-1.96.4/gluon/restricted.py", line
192, in restricted
exec ccode in environment
File
"/home/manuele/Dropbox/sviluppo/web2py-1.96.4/applications/wind2pow2/controllers/appadmin.py",
line 410, in <module>
File "/home/manuele/Dropbox/sviluppo/web2py-1.96.4/gluon/globals.py",
line 137, in <lambda>
self._caller = lambda f: f()
File
"/home/manuele/Dropbox/sviluppo/web2py-1.96.4/applications/wind2pow2/controllers/appadmin.py",
line 126, in insert
form = SQLFORM(db[table], ignore_rw=ignore_rw)
File "/home/manuele/Dropbox/sviluppo/web2py-1.96.4/gluon/sqlhtml.py",
line 817, in __init__
inp = self.widgets.options.widget(field, default)
File "/home/manuele/Dropbox/sviluppo/web2py-1.96.4/gluon/sqlhtml.py",
line 206, in widget
options = requires[0].options()
File
"/home/manuele/Dropbox/sviluppo/web2py-1.96.4/gluon/validators.py", line
438, in options
self.build_set()
File
"/home/manuele/Dropbox/sviluppo/web2py-1.96.4/gluon/validators.py", line
426, in build_set
records = self.dbset.select(*fields, **dd)
File "/home/manuele/Dropbox/sviluppo/web2py-1.96.4/gluon/dal.py",
line 5382, in select
return self.db._adapter.select(self.query,fields,attributes)
File "/home/manuele/Dropbox/sviluppo/web2py-1.96.4/gluon/dal.py",
line 1159, in select
rows = response(sql)
File "/home/manuele/Dropbox/sviluppo/web2py-1.96.4/gluon/dal.py",
line 1149, in response
self.execute(sql)
File "/home/manuele/Dropbox/sviluppo/web2py-1.96.4/gluon/dal.py",
line 1234, in execute
return self.log_execute(*a, **b)
File "/home/manuele/Dropbox/sviluppo/web2py-1.96.4/gluon/dal.py",
line 1229, in log_execute
ret = self.cursor.execute(*a,**b)
ProgrammingError: Cannot operate on a closed database.