Уже потратил уйму времени на попытку соединить Django с MySQL под Windows.
Ошибка:
Unhandled exception in thread started by <bound method Command.inner_run of <dja
ngo.contrib.staticfiles.management.commands.runserver.Command object at 0x000000
00031B22B0>>
Traceback (most recent call last):
File "c:\Python27\lib\site-packages\django\core\management\commands\runserver.
py", line 92, in inner_run
self.validate(display_num_errors=True)
File "c:\Python27\lib\site-packages\django\core\management\base.py", line 280,
in validate
num_errors = get_validation_errors(s, app)
File "c:\Python27\lib\site-packages\django\core\management\validation.py", lin
e 28, in get_validation_errors
from django.db import models, connection
File "c:\Python27\lib\site-packages\django\db\__init__.py", line 40, in <modul
e>
backend = load_backend(connection.settings_dict['ENGINE'])
File "c:\Python27\lib\site-packages\django\db\__init__.py", line 34, in __geta
ttr__
return getattr(connections[DEFAULT_DB_ALIAS], item)
File "c:\Python27\lib\site-packages\django\db\utils.py", line 93, in __getitem
__
backend = load_backend(db['ENGINE'])
File "c:\Python27\lib\site-packages\django\db\utils.py", line 27, in load_back
end
return import_module('.base', backend_name)
File "c:\Python27\lib\site-packages\django\utils\importlib.py", line 35, in im
port_module
__import__(name)
File "c:\Python27\lib\site-packages\django\db\backends\mysql\base.py", line 17
, in <module>
raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xed in position 20: ordinal
not in range(128)
Конфиг:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME' : 'pytest',
'USER': 'root',
'PASSWORD': '',
'HOST': 'localhost',
'PORT': '3306',
}
}
Подскажите как решить данную проблему