<type 'exceptions.TypeError'> decorator() takes exactly 1 argument (0 given)

54 views
Skip to first unread message

mostwanted

unread,
Jan 12, 2018, 5:31:35 AM1/12/18
to web2py-users
Lately i am experiencing this error:

<type 'exceptions.TypeError'> decorator() takes exactly 1 argument (0 given)

 but i do not understand what it stems from, here is the controller below:
def Company_Update():
    details
=db(db.company).select(db.company.ALL)
    details2
=db(db.company).select(db.company.ALL)
   
for dtls in details2:
        detail
=crud.update(db.company, dtls.id)
   
return locals()


The view code is below:
{{extend 'layout.html'}}
<hr class="style-head"/>
<div class="todo">
<h1>
    UPDATE YOUR COMPANY DETAILS
</h1>
</
div>
<hr class="style-head"/>
<div class="outerContainer">
<div class="bodyContainer">
{{=detail}}
   
{{pass}}
</div>
</
div>

It has just recently started giving this exception () but initially it was executing well when i clicked on its link!
What could be wrong with my code? have i added or subtracted something i wasn't supposed to???
Please help me. thank you.


Anthony

unread,
Jan 12, 2018, 10:27:17 AM1/12/18
to web2py-users
On Friday, January 12, 2018 at 5:31:35 AM UTC-5, mostwanted wrote:
Lately i am experiencing this error:

<type 'exceptions.TypeError'> decorator() takes exactly 1 argument (0 given)

 but i do not understand what it stems from, here is the controller below:
def Company_Update():
    details
=db(db.company).select(db.company.ALL)
    details2
=db(db.company).select(db.company.ALL)
   
for dtls in details2:
        detail
=crud.update(db.company, dtls.id)
   
return locals()


Please show the full traceback and all relevant code (the only decorator() functions in web2py relate to Auth and Cache decorators, but I don't see any related code above).

Also, why do you select the same set of records twice, and what is the point of looping through the records in details2 given that your code returns only the final record (i.e., the value "detail" ends up with)?

Anthony
Reply all
Reply to author
Forward
0 new messages