'sorted' is a Python builtin, and it happens to be called in the appadmin.html view. All variables/objects created in the model files are available in the view environment as well, so you have redefined the Python builtin sorted() function as a dictionary -- *sorted=Analises*. To be safe, try to avoid using Python keywords as variable names. Anthony
On Thursday, July 21, 2011 11:53:19 AM UTC-4, Ramos wrote: > hello, i have some startup variables that i defined in db.py > > when i go to database administration i get an error. > > > Traceback (most recent call last): > File "gluon/restricted.py", line 192, in restricted > File "D:/web2py10/web2py/applications/Lims/views/appadmin.html", line 109, > in <module> > TypeError: 'dict' object is not callable > > > > the code i added to db.py is this > > import pickle > file = open("d:\\Analises.pck", "r") > *Analises = pickle.load(file)* > file.close() > file = open("d:\\Unidades.pck", "r") > Unidades= pickle.load(file) > file.close() > file = open("d:\\Templates.pck", "r") > *Templates = pickle.load(file)* > file.close() > file = open("d:\\Tipo.pck", "r") > Tipo = pickle.load(file) > file.close() > *sorted=Analises* > > What could be the cause for the error? and again, what can i not declare in > models? > > thank you > António >