When I run python manage.py syncdb in my project, I get the following exception. (I deleted most of the text because it still wonβt help find the error.)
(...) raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e) UnicodeDecodeError: 'ascii' codec can't decode byte 0xe3 in position 21: ordinal not in range(128)
This error will appear in any of my projects in which I use MySQL. If I use SQLite, this problem will not appear. I tested the creation of the teste database with the latin1 and utf-8 collaborations. These are my database settings:
DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'teste', 'USER': 'root', 'PASSWORD': '', 'HOST': '127.0.0.1', 'PORT': '3306', } }
This worked before when I was working from another computer, but not this. I installed everything that was necessary to start the project.
Even getting this tutorial for working with MySQL will raise this exception: http://django-rest-framework.org/tutorial/quickstart.html
source share