[Fixed]-DjangoUnicodeDecodeError while makemigrations after upgrading to 1.8

1👍

You should avoid problems if you use unicode strings in your models, e.g. verbose_name=u"Wydział".

You might prefer to import unicode_literals from the future library, as recommended by the Django docs. Be careful if adding this to an existing module though!

from __future__ import unicode_literals

0👍

Unicode vs python string problem. The Django docs have moved further down the path toward python 3, so they aren’t in the habit of warning you anymore. In python2, put a u in front of the string, e.g., u"Wydział". Since you’re running 2.7, you can try from __future__ import unicode_literals. Note that this second solution could break some other things in your project.

Leave a comment