It appears that auth.settings.create_user_groups takes either False or the string that formats the user group creation message.
So you'll need to provide a string format representation ie '%(id)s' as is shown in the error. However that won't convert to a boolean, so your cast function will fail. -Mark On Thu, Nov 19, 2015 at 11:22 PM, 黄祥 <steve.van.chris...@gmail.com> wrote: > same result, here is step i took > 1. create new simple application from web2py admin named a > 2. add auth in privates/appconfig.ini > [auth] > create_user_groups = 1 > 3. add auth in models/db.py > auth.settings.create_user_groups = myconf.take('auth.create_user_groups', > cast = lambda value: bool(int(value) ) ) > > attached the simple app that i took the step above, when i change > create_user_groups = 0, no error occured when i sign up, but, when i set > create_user_group = 1, same error traceback occured, when i sign up > > best regards, > stifan > > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to a topic in the > Google Groups "web2py-users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/web2py/rohbrJEZG_E/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.