Недавно я обновил свой Django с 1.6.5 до 1.8.3. Я использую Юг, поэтому следую tutorial, я удалил South, удалил старые миграции и запустил makemigrations. Затем я получил ошибку:
[mefioo@ibmed-server kariera_naukowa]$ env/bin/python src/manage.py makemigrations
Migrations for 'editcv':
0001_initial.py:
- Create model Adresy
- Create model Affiliacja
[...all models from models.py...]
- Create model ZalRo
- Add field WszysCz to wlasne
[...so far only ForeignKeys, but not all of them...]
- Add field user to adresy
Traceback (most recent call last):
File "src/manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/mefioo/public_html/kariera_naukowa/env/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
utility.execute()
File "/home/mefioo/public_html/kariera_naukowa/env/lib/python2.7/site-packages/django/core/management/__init__.py", line 330, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/mefioo/public_html/kariera_naukowa/env/lib/python2.7/site-packages/django/core/management/base.py", line 393, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/mefioo/public_html/kariera_naukowa/env/lib/python2.7/site-packages/django/core/management/base.py", line 444, in execute
output = self.handle(*args, **options)
File "/home/mefioo/public_html/kariera_naukowa/env/lib/python2.7/site-packages/django/core/management/commands/makemigrations.py", line 143, in handle
self.write_migration_files(changes)
File "/home/mefioo/public_html/kariera_naukowa/env/lib/python2.7/site-packages/django/core/management/commands/makemigrations.py", line 171, in write_migration_files
migration_string = writer.as_string()
File "/home/mefioo/public_html/kariera_naukowa/env/lib/python2.7/site-packages/django/db/migrations/writer.py", line 166, in as_string
operation_string, operation_imports = OperationWriter(operation).serialize()
File "/home/mefioo/public_html/kariera_naukowa/env/lib/python2.7/site-packages/django/db/migrations/writer.py", line 124, in serialize
_write(arg_name, arg_value)
File "/home/mefioo/public_html/kariera_naukowa/env/lib/python2.7/site-packages/django/db/migrations/writer.py", line 75, in _write
arg_string, arg_imports = MigrationWriter.serialize(item)
File "/home/mefioo/public_html/kariera_naukowa/env/lib/python2.7/site-packages/django/db/migrations/writer.py", line 303, in serialize
item_string, item_imports = cls.serialize(item)
File "/home/mefioo/public_html/kariera_naukowa/env/lib/python2.7/site-packages/django/db/migrations/writer.py", line 377, in serialize
return cls.serialize_deconstructed(path, args, kwargs)
File "/home/mefioo/public_html/kariera_naukowa/env/lib/python2.7/site-packages/django/db/migrations/writer.py", line 268, in serialize_deconstructed
arg_string, arg_imports = cls.serialize(arg)
File "/home/mefioo/public_html/kariera_naukowa/env/lib/python2.7/site-packages/django/db/migrations/writer.py", line 296, in serialize
value = force_text(value)
File "/home/mefioo/public_html/kariera_naukowa/env/lib/python2.7/site-packages/django/utils/encoding.py", line 102, in force_text
raise DjangoUnicodeDecodeError(s, *e.args)
django.utils.encoding.DjangoUnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 10: ordinal not in range(128). You passed in <django.utils.functional.__proxy__ object at 0x268a9d0> (<class 'django.utils.functional.__proxy__'>)
Я проверяю, 0xc3 - это Ã или Ä, которые я, конечно, не использую (его даже нет в польском алфавите).
Один из FK, который прошел,
wydzial = models.ForeignKey(Wydzial, verbose_name="Wydział")
и в нем есть польская буква ł, но все в порядке.
Что мне здесь не хватает?
verbose_name=u"Wydział"
. - person Alasdair   schedule 15.07.2015