Ask Your Question

Bug: Deleting a User

asked 2013-09-18 03:31:02 -0600

Rupreck's avatar

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/", line 111, in get_response response = callback(request, callback_args, *callback_kwargs)

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

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

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

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

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

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

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

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

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

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

File "/usr/local/lib/python2.7/dist-packages/django/contrib/admin/", 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/", line 175, in collect if not sub_objs:

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

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

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

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

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

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

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

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

File "/usr/local/lib/python2.7/dist-packages/MySQLdb/", 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 ... (more)

edit retag flag offensive close merge delete



"Table does not exist" points to an issue in the database - a missing table - try running `python syncdb --migrate`.

Evgeny's avatar Evgeny  ( 2013-09-23 11:30:14 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2013-09-23 07:57:27 -0600

Mustafa's avatar

It's better to not delete any user. And only move this user to blocked user group.

Blocked users can only login and send feedback to the site administrators, their url and profile will also be hidden.

edit flag offensive delete link more



The Problem is when you have to block 100 users. You need too much time, but deleting via /admin panel is faster, because you can find all users with emails, ,... at once

Toms's avatar Toms  ( 2013-09-23 10:47:40 -0600 )edit

@Toms that's a good point, we'll need to implement bulk user moderation in the future versions.

Evgeny's avatar Evgeny  ( 2013-09-23 11:28:48 -0600 )edit

@Evgeny@Toms there was this bulk user moderation features in OSQA, which I liked for such purposes. I don't know why it was removed for Askbot.

pajju's avatar pajju  ( 2013-09-28 01:35:18 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2013-09-18 03:31:02 -0600

Seen: 387 times

Last updated: Sep 23 '13