did this code work in earlier versions of web2py? Can you post minimal code to reproduce?
On Thursday, 11 April 2019 18:58:23 UTC-7, 黄祥 wrote: > > Traceback (most recent call last): > File "/Users/sugizo/learn/python/web2py/gluon/authapi.py", line 590, in > has_membership > group_id = int(group_id) > ValueError: invalid literal for int() with base 10: 'Admin' > > During handling of the above exception, another exception occurred: > > Traceback (most recent call last): > File "/Users/sugizo/learn/python/web2py/gluon/restricted.py", line 219, > in restricted > exec(ccode, environment) > File > "/Users/sugizo/learn/python/web2py/applications/ppd/models/db_wizard_0_auth.py", > > line 21, in <module> > has_membership_admin = auth.has_membership('Admin') > File "/Users/sugizo/learn/python/web2py/gluon/authapi.py", line 592, in > has_membership > group_id = self.id_group(group_id) # interpret group_id as a role > File "/Users/sugizo/learn/python/web2py/gluon/authapi.py", line 454, in > id_group > rows = self.db(self.table_group().role == role).select() > File > "/Users/sugizo/learn/python/web2py/gluon/packages/dal/pydal/objects.py", > line 2395, in select > return adapter.select(self.query, fields, attributes) > File > "/Users/sugizo/learn/python/web2py/gluon/packages/dal/pydal/adapters/sqlite.py", > > line 82, in select > return super(SQLite, self).select(query, fields, attributes) > File > "/Users/sugizo/learn/python/web2py/gluon/packages/dal/pydal/adapters/base.py", > > line 763, in select > return self._select_aux(sql, fields, attributes, colnames) > File > "/Users/sugizo/learn/python/web2py/gluon/packages/dal/pydal/adapters/base.py", > > line 719, in _select_aux > rows = self._select_aux_execute(sql) > File > "/Users/sugizo/learn/python/web2py/gluon/packages/dal/pydal/adapters/base.py", > > line 713, in _select_aux_execute > self.execute(sql) > File > "/Users/sugizo/learn/python/web2py/gluon/packages/dal/pydal/adapters/__init__.py", > > line 67, in wrap > return f(*args, **kwargs) > File > "/Users/sugizo/learn/python/web2py/gluon/packages/dal/pydal/adapters/base.py", > > line 413, in execute > rv = self.cursor.execute(command, *args[1:], **kwargs) > sqlite3.OperationalError: no such table: auth_group > > step to reproduce just copy the working old app into web2py recent version > 2.18.5 with Python 3.7.3 > > 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 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.