#23494: Makemigrations fails with python3 ----------------------------+--------------------- Reporter: rumpelsepp | Owner: nobody Type: Bug | Status: new Component: Migrations | Version: 1.7 Severity: Normal | Keywords: python3 Triage Stage: Unreviewed | Has patch: 0 Easy pickings: 0 | UI/UX: 0 ----------------------------+--------------------- Hi, makemigrations very often fails under python3 with the following traceback:
{{{ $ python manage.py makemigrations Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/home/stefan/.virtualenvs/python3/lib/python3.4/site- packages/django/core/management/__init__.py", line 385, in execute_from_command_line utility.execute() File "/home/stefan/.virtualenvs/python3/lib/python3.4/site- packages/django/core/management/__init__.py", line 377, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/home/stefan/.virtualenvs/python3/lib/python3.4/site- packages/django/core/management/base.py", line 288, in run_from_argv self.execute(*args, **options.__dict__) File "/home/stefan/.virtualenvs/python3/lib/python3.4/site- packages/django/core/management/base.py", line 338, in execute output = self.handle(*args, **options) File "/home/stefan/.virtualenvs/python3/lib/python3.4/site- packages/django/core/management/commands/makemigrations.py", line 111, in handle convert_apps=app_labels or None, File "/home/stefan/.virtualenvs/python3/lib/python3.4/site- packages/django/db/migrations/autodetector.py", line 40, in changes changes = self._detect_changes(convert_apps, graph) File "/home/stefan/.virtualenvs/python3/lib/python3.4/site- packages/django/db/migrations/autodetector.py", line 107, in _detect_changes self.old_apps = self.from_state.render(ignore_swappable=True) File "/home/stefan/.virtualenvs/python3/lib/python3.4/site- packages/django/db/migrations/state.py", line 67, in render model.render(self.apps) File "/home/stefan/.virtualenvs/python3/lib/python3.4/site- packages/django/db/migrations/state.py", line 311, in render body, File "/home/stefan/.virtualenvs/python3/lib/python3.4/site- packages/django/db/models/base.py", line 171, in __new__ new_class.add_to_class(obj_name, obj) File "/home/stefan/.virtualenvs/python3/lib/python3.4/site- packages/django/db/models/base.py", line 300, in add_to_class value.contribute_to_class(cls, name) File "/home/stefan/.virtualenvs/python3/lib/python3.4/site- packages/django/db/models/fields/related.py", line 1572, in contribute_to_class super(ForeignObject, self).contribute_to_class(cls, name, virtual_only=virtual_only) File "/home/stefan/.virtualenvs/python3/lib/python3.4/site- packages/django/db/models/fields/related.py", line 264, in contribute_to_class 'app_label': cls._meta.app_label.lower() TypeError: unsupported operand type(s) for %: 'bytes' and 'dict' }}} Using python2 instead fixes the problem. I use Django 1.7 from pip. -- Ticket URL: <https://code.djangoproject.com/ticket/23494> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/053.ef9bc8d41be5944905929d548b89a63e%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.