First time here? Check out the FAQ!

Revision history  [back]

Bug: Deleting a User

Please advise how to resolve:

Deleting a user from admin/auth/user/XXX/delete/ leads to:

DatabaseError: (1146, "Table 'askbot.group_messaging_lastvisittime' doesn't exist")

Traceback (most recent call last):

File "/usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py", line 111, in get_response response = callback(request, callback_args, *callback_kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/options.py", line 366, in wrapper return self.admin_site.admin_view(view)(args, *kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py", line 91, in _wrapped_view response = view_func(request, args, *kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/views/decorators/cache.py", line 89, in _wrapped_view_func response = view_func(request, args, *kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/sites.py", line 196, in inner return view(request, args, *kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py", line 25, in _wrapper return bound_func(args, *kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py", line 91, in _wrapped_view response = view_func(request, args, *kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/utils/decorators.py", line 21, in bound_func return func(self, args2, *kwargs2)

File "/usr/local/lib/python2.7/dist-packages/django/db/transaction.py", line 209, in inner return func(args, *kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/options.py", line 1274, in delete_view [obj], opts, request.user, self.admin_site, using)

File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/util.py", line 104, in get_deleted_objects collector.collect(objs)

File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/util.py", line 155, in collect return super(NestedObjects, self).collect(objs, source_attr=source_attr, **kwargs)

File "/usr/local/lib/python2.7/dist-packages/django/db/models/deletion.py", line 175, in collect if not sub_objs:

File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 130, in __nonzero__ iter(self).next()

File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 118, in _result_iter self._fill_cache()

File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 875, in _fill_cache self._result_cache.append(self._iter.next())

File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line 291, in iterator for row in compiler.results_iter():

File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 763, in results_iter for rows in self.execute_sql(MULTI):

File "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 818, in execute_sql cursor.execute(sql, params)

File "/usr/local/lib/python2.7/dist-packages/django/db/backends/mysql/base.py", line 114, in execute return self.cursor.execute(query, args)

File "/usr/local/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 201, in execute self.errorhandler(self, exc, value)

File "/usr/local/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler raise errorclass, errorvalue

DatabaseError: (1146, "Table 'askbot.group_messaging_lastvisittime' doesn't exist")

Note that this database was migrated successfully from 0.6.70 and the rest of the site works fine.