unexpected keyword argument 'salt'

73 views
Skip to first unread message

Andreas Kaiser

unread,
Jul 30, 2012, 3:16:01 AM7/30/12
to web...@googlegroups.com
Hi,

using latest trunk and in admin I've created a new simple app. If I try to run this app, I get a ticket.

<type 'exceptions.TypeError'> __init__() got an unexpected keyword argument 'salt'


TRACEBACK

1.
2.
3.
4.
5.
6.
7.
Traceback (most recent call last):
File "E:\web2py-2-work\gluon\restricted.py", line 205, in restricted
exec ccode in environment
File "E:/web2py-2-work/applications/uittime/models/db.py", line 43, in <module>
auth = Auth(db, hmac_key=Auth.get_or_create_key(), salt=True)
TypeError: __init__() got an unexpected keyword argument 'salt'
In the example App the line for Auth initialation looks like:
auth = Auth(db)
Is this an error in trunk for create a new app?

Andreas

Massimo Di Pierro

unread,
Jul 30, 2012, 9:35:15 AM7/30/12
to web...@googlegroups.com
You have created a new app using an experimental web2py in trunk. It created a models/db.py with Auth(...,salt=True). 
This option has been removed from trunk (there is no more salt attribute, we always salt) therefore you have to edit your db.py and remove salt=True.

This is not a backward compatibility issue because no app created with stable is broken.

Massimo

Andreas Kaiser

unread,
Jul 30, 2012, 10:21:50 AM7/30/12
to web...@googlegroups.com
Hi Massimo,

I know, from now the password is always salted. But the automatic creation of an app produces this error (in trunk).

Andreas

Niphlod

unread,
Jul 30, 2012, 12:31:56 PM7/30/12
to web...@googlegroups.com
probably you need to update your welcome.w2p too (i.e. your welcome.w2p is a zip of an old scaffolding app.)
Try to delete it if you have it in the same folder web2py.py is (it will be automatically recreated starting from applications/welcome)

Andreas Kaiser

unread,
Jul 30, 2012, 12:40:33 PM7/30/12
to web...@googlegroups.com
Hi Niphlod,

thats the way! Thank you!

Andreas
Reply all
Reply to author
Forward
0 new messages