Hello Niphlod, this is the traceback: Traceback (most recent call last): File "/home/wouter/Web2py/web2py/gluon/restricted.py", line 212, in restricted exec ccode in environment File "/home/wouter/Web2py/web2py/applications/edirelaties/controllers/default.py" <http://127.0.0.1:8000/admin/default/edit/edirelaties/controllers/default.py>, line 381, in <module> File "/home/wouter/Web2py/web2py/gluon/globals.py", line 188, in <lambda> self._caller = lambda f: f() File "/home/wouter/Web2py/web2py/applications/edirelaties/controllers/default.py" <http://127.0.0.1:8000/admin/default/edit/edirelaties/controllers/default.py>, line 200, in add_protocol Field('relatie_id', writable=False, readable=False), TypeError: __init__() takes exactly 1 argument (4 given)
Where should I look? Op woensdag 7 november 2012 11:54:24 UTC+1 schreef Niphlod het volgende: > > something else is wrong in your app, that piece of code works perfectly > fine (the fact that you're declaring 5 fields to let display only one is > quite not understandable but hey, it works nonetheless) > > On Wednesday, November 7, 2012 11:32:39 AM UTC+1, Wouter Pronk wrote: >> >> I have the following code: >> form = SQLFORM.factory( >> Field('relatie_id', writable=False, readable=False), >> Field('relatie_nummer', writable=False, readable=False), >> Field('direction', writable=False, readable=False), >> Field('protocol', writable=False, readable=False), >> Field('email', requires=[IS_EMAIL(),IS_NOT_IN_DB(db, >> 'comprotocol.email')])) >> >> and this is working perfectly in version 1.99 but not in 2.2.1. I get an >> error: >> >> File >> "/home/wouter/Web2py/web2py/applications/edirelaties/controllers/default.py" >> <http://127.0.0.1:8000/admin/default/edit/edirelaties/controllers/default.py>, >> line 199, in add_protocol >> Field('relatieid', writable=False, readable=False), >> TypeError: __init__() takes exactly 1 argument (4 given >> >> What is wrong? >> > --