Can't create superuser !

Issue #82 new
jixueshan
created an issue

Django1.9.0 and django-mssql 1.8a , error:

E:\ggzy>python manage.py migrate web
Operations to perform:
  Apply all migrations: web
Running migrations:
  Rendering model states... DONE
  Applying web.0001_initial... OK
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line
353, in execute_from_command_line
    utility.execute()
  File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line
345, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "C:\Python27\lib\site-packages\django\core\management\base.py", line 348,
 in run_from_argv
    self.execute(*args, **cmd_options)
  File "C:\Python27\lib\site-packages\django\core\management\base.py", line 399,
 in execute
    output = self.handle(*args, **options)
  File "C:\Python27\lib\site-packages\django\core\management\commands\migrate.py
", line 204, in handle
    emit_post_migrate_signal(self.verbosity, self.interactive, connection.alias)

  File "C:\Python27\lib\site-packages\django\core\management\sql.py", line 50, i
n emit_post_migrate_signal
    using=db)
  File "C:\Python27\lib\site-packages\django\dispatch\dispatcher.py", line 192,
in send
    response = receiver(signal=self, sender=sender, **named)
  File "C:\Python27\lib\site-packages\django\contrib\auth\management\__init__.py
", line 85, in create_permissions
    ctype = ContentType.objects.db_manager(using).get_for_model(klass)
  File "C:\Python27\lib\site-packages\django\contrib\contenttypes\models.py", li
ne 65, in get_for_model
    ct = self.get(app_label=opts.app_label, model=opts.model_name)
  File "C:\Python27\lib\site-packages\django\db\models\manager.py", line 122, in
 manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "C:\Python27\lib\site-packages\django\db\models\query.py", line 381, in g
et
    num = len(clone)
  File "C:\Python27\lib\site-packages\django\db\models\query.py", line 240, in _
_len__
    self._fetch_all()
  File "C:\Python27\lib\site-packages\django\db\models\query.py", line 1074, in
_fetch_all
    self._result_cache = list(self.iterator())
  File "C:\Python27\lib\site-packages\django\db\models\query.py", line 52, in __
iter__
    results = compiler.execute_sql()
  File "C:\Python27\lib\site-packages\django\db\models\sql\compiler.py", line 84
8, in execute_sql
    cursor.execute(sql, params)
  File "C:\Python27\lib\site-packages\django\db\backends\utils.py", line 64, in
execute
    return self.cursor.execute(sql, params)
  File "C:\Python27\lib\site-packages\django\db\utils.py", line 95, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "C:\Python27\lib\site-packages\django\db\backends\utils.py", line 64, in
execute
    return self.cursor.execute(sql, params)
  File "C:\Python27\lib\site-packages\django_mssql-1.8a0-py2.7.egg\sqlserver_ado
\dbapi.py", line 647, in execute
    self._execute_command()
  File "C:\Python27\lib\site-packages\django_mssql-1.8a0-py2.7.egg\sqlserver_ado
\dbapi.py", line 558, in _execute_command
    self._raiseCursorError(klass, _message)
  File "C:\Python27\lib\site-packages\django_mssql-1.8a0-py2.7.egg\sqlserver_ado
\dbapi.py", line 488, in _raiseCursorError
    eh(self.connection, self, errorclass, errorvalue)
  File "C:\Python27\lib\site-packages\django_mssql-1.8a0-py2.7.egg\sqlserver_ado
\dbapi.py", line 103, in standardErrorHandler
    raise errorclass(errorvalue)
django.db.utils.DatabaseError: (-2147352567, '\xb7\xa2\xc9\xfa\xd2\xe2\xcd\xe2\x
a1\xa3', (0, u'Microsoft OLE DB Provider for SQL Server', u"\u5bf9\u8c61\u540d '
django_content_type' \u65e0\u6548\u3002", None, 0, -2147217865), None)
Command:
SELECT [django_content_type].[id], [django_content_type].[app_label], [django_co
ntent_type].[model] FROM [django_content_type] WHERE ([django_content_type].[mod
el] = ? AND [django_content_type].[app_label] = ?)
Parameters:
[u'Name: p0, Dir.: Input, Type: adVarWChar, Size: 8, Value: "logentry", Precisio
n: 0, NumericScale: 0',
 u'Name: p1, Dir.: Input, Type: adVarWChar, Size: 5, Value: "admin", Precision:
0, NumericScale: 0']
DATABASES = {
    'default': {
        'NAME': 'my_database',
        'ENGINE': 'sqlserver_ado',
        'HOST': '127.0.0.1',
        'USER': 'sa',
        'PASSWORD': 'bbbb',
        'OPTIONS':{'provider':'SQLOLEDB'},

    }
}

无标题.jpg

Comments (7)

  1. jixueshan reporter

    Microsoft SQL Server 2012 - 11.0.2100.60 (Intel X86) Feb 10 2012 19:13:17 Copyright (c) Microsoft Corporation Enterprise Edition: Core-based Licensing on Windows NT 6.1 <X86> (Build 7601: Service Pack 1)

    Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015, 20:32:19) [MSC v.1500 32 bit

  2. Log in to comment