First time here? Check out the FAQ!

Errors when running migrations

Hi, I'm trying to setup Askbot on Windows but I'm getting an error in the migration "0020_auto__add_field_repute_comment__chg_field_repute_question" when running "python migrate askbot". The error is 1005 "Can't create table 'nameofdb.#sql-8f8_7c' errno: 121".

The database engine used is MySQL 5.5 and the version of Python is 2.7. I'm new to Python and Django so maybe I'm missing something very obvious.

I tried to comment out the following line in the migration 0020

db.alter_column(u'repute', 'question_id','django.db.models.fields.related.ForeignKey')(to=orm['askbot.Question'], null=True, blank=True))

and then it passes. But when then running the migration for django_authopenid using "python migrate django_authopenid #embedded login application" I get another error (TypeError: handle() got multiple values for keyword argument 'merge' on line 220 in C:\Python27\Lib\site-packages\django-1.3-py2.7.egg\django\core\management\

Any ideas?


Kristofer's avatar
asked 2011-09-07 06:20:44 -0500
edit flag offensive 0 remove flag close merge delete


add a comment see more comments

1 Answer


Maybe your mysql storage engine is InnoDB? Askbot is not well tested with it. Try MyISAM.

To find out - log in to mysql shell and type, for example

show create table auth_user;

Type of the storage engine will be shown at the end of the output.

If this does not help, the only way to debug this is to reproduce your installation on other system, I have never seen this error before.

Evgeny's avatar
updated 2011-09-07 08:51:59 -0500, answered 2011-09-07 08:44:08 -0500
edit flag offensive 0 remove flag delete link


Thanks! The storage engine was indeed InnoDB. After having switched to MyISAM all migrations passed without any problems.I still have the problem with the migration of django_authopenid though. Any help would be very much appreciated. Thanks

Kristofer's avatar Kristofer (2011-09-08 02:54:53 -0500) edit

What are the problems with django_authopenid?

Evgeny's avatar Evgeny (2011-09-08 06:37:48 -0500) edit

The problem turned out to be when a migration wanted to make two fields unique in the table django_authopenid_userassociation the previously unique field could not be found. I did this manually and the site is now up and running. Thanks again for the help.

Kristofer's avatar Kristofer (2011-09-08 09:11:10 -0500) edit

Well, we want this to work right out of the box, I'll test it again on our system. Thanks for the feedback.

Evgeny's avatar Evgeny (2011-09-08 09:20:13 -0500) edit
add a comment see more comments