#35545: Fix create_permissions LookupErrors
----------------------------------+------------------------------------
Reporter: Csirmaz Bendegúz | Owner: nobody
Type: Bug | Status: new
Component: contrib.auth | Version: 5.1
Severity: Release blocker | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------------+------------------------------------
Changes (by Natalia Bidart):
* cc: Adam Johnson (added)
* stage: Unreviewed => Accepted
Comment:
Thank you Csirmaz for this report!
I can confirm I can reproduce in a simple Django project:
{{{
$ python -Wall manage.py migrate generator
Operations to perform:
Apply all migrations: generator
Running migrations:
Applying generator.0001_initial... OK
Traceback (most recent call last):
File "/home/nessita/fellowship/django/django/apps/registry.py", line
158, in get_app_config
return self.app_configs[app_label]
~~~~~~~~~~~~~~~~^^^^^^^^^^^
KeyError: 'generator'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/nessita/fellowship/checklist-generator/manage.py", line 22,
in <module>
main()
File "/home/nessita/fellowship/checklist-generator/manage.py", line 18,
in main
execute_from_command_line(sys.argv)
File
"/home/nessita/fellowship/django/django/core/management/__init__.py", line
442, in execute_from_command_line
utility.execute()
File
"/home/nessita/fellowship/django/django/core/management/__init__.py", line
436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/home/nessita/fellowship/django/django/core/management/base.py",
line 413, in run_from_argv
self.execute(*args, **cmd_options)
File "/home/nessita/fellowship/django/django/core/management/base.py",
line 459, in execute
output = self.handle(*args, **options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/nessita/fellowship/django/django/core/management/base.py",
line 107, in wrapper
res = handle_func(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/home/nessita/fellowship/django/django/core/management/commands/migrate.py",
line 384, in handle
emit_post_migrate_signal(
File "/home/nessita/fellowship/django/django/core/management/sql.py",
line 52, in emit_post_migrate_signal
models.signals.post_migrate.send(
File "/home/nessita/fellowship/django/django/dispatch/dispatcher.py",
line 189, in send
response = receiver(signal=self, sender=sender, **named)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/home/nessita/fellowship/django/django/contrib/auth/management/__init__.py",
line 78, in create_permissions
ctypes = ContentType.objects.db_manager(using).get_for_models(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/home/nessita/fellowship/django/django/contrib/contenttypes/models.py",
line 93, in get_for_models
ct._meta.apps.get_model(ct.app_label, ct.model)._meta, []
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/nessita/fellowship/django/django/apps/registry.py", line
208, in get_model
app_config = self.get_app_config(app_label)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/nessita/fellowship/django/django/apps/registry.py", line
165, in get_app_config
raise LookupError(message)
LookupError: No installed app with label 'generator'.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/35545#comment:2>
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107019036ca80e2-1a9119be-a230-4531-9297-6faa56ccaf7f-000000%40eu-central-1.amazonses.com.