Fix TypeError: not enough arguments for format string

使用South进行数据迁移，会出现如下异常：
'''
Error in migration: taobao:0001_initial
Traceback (most recent call last):
  File "C:\Program Files\JetBrains\PyCharm 3.1.1\helpers\pycharm\django_manage.py", line 23, in <module>
    run_module(manage_file, None, '__main__', True)
  File "D:\Interpreters\Python273\Lib\runpy.py", line 176, in run_module
    fname, loader, pkg_name)
  File "D:\Interpreters\Python273\Lib\runpy.py", line 82, in _run_module_code
    mod_name, mod_fname, mod_loader, pkg_name)
  File "D:\Interpreters\Python273\Lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "D:\Projects\PyCharm\dian123\manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "D:\Interpreters\Python273-dian123-env\lib\site-packages\django\core\management\__init__.py", line 399, in execute_from_command_line
    utility.execute()
  File "D:\Interpreters\Python273-dian123-env\lib\site-packages\django\core\management\__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "D:\Interpreters\Python273-dian123-env\lib\site-packages\django\core\management\base.py", line 242, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "D:\Interpreters\Python273-dian123-env\lib\site-packages\django\core\management\base.py", line 285, in execute
    output = self.handle(*args, **options)
  File "D:\Interpreters\Python273-dian123-env\lib\site-packages\django_sae\management\commands\sae_syncdb.py", line 70, in handle
    sae_migrate.Command().execute()
  File "D:\Interpreters\Python273-dian123-env\lib\site-packages\django\core\management\base.py", line 285, in execute
    output = self.handle(*args, **options)
  File "D:\Interpreters\Python273-dian123-env\lib\site-packages\django_sae\management\commands\sae_migrate.py", line 9, in handle
    super(Command, self).handle(*args, **kwargs)
  File "D:\Interpreters\Python273-dian123-env\lib\site-packages\south\management\commands\migrate.py", line 111, in handle
    ignore_ghosts = ignore_ghosts,
  File "D:\Interpreters\Python273-dian123-env\lib\site-packages\south\migration\__init__.py", line 220, in migrate_app
    success = migrator.migrate_many(target, workplan, database)
  File "D:\Interpreters\Python273-dian123-env\lib\site-packages\south\migration\migrators.py", line 254, in migrate_many
    result = migrator.__class__.migrate_many(migrator, target, migrations, database)
  File "D:\Interpreters\Python273-dian123-env\lib\site-packages\south\migration\migrators.py", line 329, in migrate_many
    result = self.migrate(migration, database)
  File "D:\Interpreters\Python273-dian123-env\lib\site-packages\south\migration\migrators.py", line 133, in migrate
    result = self.run(migration, database)
  File "D:\Interpreters\Python273-dian123-env\lib\site-packages\south\migration\migrators.py", line 114, in run
    return self.run_migration(migration, database)
  File "D:\Interpreters\Python273-dian123-env\lib\site-packages\south\migration\migrators.py", line 89, in run_migration
    self.record(migration, database)
  File "D:\Interpreters\Python273-dian123-env\lib\site-packages\south\migration\migrators.py", line 289, in record
    record = MigrationHistory.for_migration(migration, database)
  File "D:\Interpreters\Python273-dian123-env\lib\site-packages\south\models.py", line 21, in for_migration
    migration=migration.name(),
  File "D:\Interpreters\Python273-dian123-env\lib\site-packages\django\db\models\manager.py", line 151, in get
    return self.get_queryset().get(*args, **kwargs)
  File "D:\Interpreters\Python273-dian123-env\lib\site-packages\django\db\models\query.py", line 301, in get
    num = len(clone)
  File "D:\Interpreters\Python273-dian123-env\lib\site-packages\django\db\models\query.py", line 77, in __len__
    self._fetch_all()
  File "D:\Interpreters\Python273-dian123-env\lib\site-packages\django\db\models\query.py", line 854, in _fetch_all
    self._result_cache = list(self.iterator())
  File "D:\Interpreters\Python273-dian123-env\lib\site-packages\django\db\models\query.py", line 220, in iterator
    for row in compiler.results_iter():
  File "D:\Interpreters\Python273-dian123-env\lib\site-packages\django\db\models\sql\compiler.py", line 709, in results_iter
    for rows in self.execute_sql(MULTI):
  File "D:\Interpreters\Python273-dian123-env\lib\site-packages\django\db\models\sql\compiler.py", line 782, in execute_sql
    cursor.execute(sql, params)
  File "D:\Interpreters\Python273-dian123-env\lib\site-packages\django\db\backends\util.py", line 69, in execute
    return super(CursorDebugWrapper, self).execute(sql, params)
  File "D:\Interpreters\Python273-dian123-env\lib\site-packages\django\db\backends\util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "D:\Interpreters\Python273-dian123-env\lib\site-packages\django\db\backends\mysql\base.py", line 124, in execute
    return self.cursor.execute(query, args)
  File "D:\Interpreters\Python273\lib\site-packages\sae\_restful_mysql\cursors.py", line 164, in execute
    query = query % db.literal(args)
TypeError: not enough arguments for format string
'''
调试了很久都没法解决。最后将异常所在的execute方法，替换为最新版的MySQLdb中的execute方法，就不会出现异常了。