question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

LookupError: No installed app with label

See original GitHub issue

Hi, when I try to migrate to latest version I get a following error:

Running migrations:
  Rendering model states... DONE
  Applying reversion.0003_auto_20160601_1600...Traceback (most recent call last):
  File "/usr/local/lib/python3.5/dist-packages/django/apps/registry.py", line 148, in get_app_config
    return self.app_configs[app_label]
KeyError: 'voting'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "manage.py", line 17, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.5/dist-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.5/dist-packages/django/core/management/__init__.py", line 345, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.5/dist-packages/django/core/management/base.py", line 348, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.5/dist-packages/raven/contrib/django/management/__init__.py", line 41, in new_execute
    return original_func(self, *args, **kwargs)
  File "/usr/local/lib/python3.5/dist-packages/django/core/management/base.py", line 399, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python3.5/dist-packages/django/core/management/commands/migrate.py", line 200, in handle
    executor.migrate(targets, plan, fake=fake, fake_initial=fake_initial)
  File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/executor.py", line 92, in migrate
    self._migrate_all_forwards(plan, full_plan, fake=fake, fake_initial=fake_initial)
  File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/executor.py", line 121, in _migrate_all_forwards
    state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
  File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/executor.py", line 198, in apply_migration
    state = migration.apply(state, schema_editor)
  File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/migration.py", line 123, in apply
    operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
  File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/operations/special.py", line 183, in database_forwards
    self.code(from_state.apps, schema_editor)
  File "/usr/local/lib/python3.5/dist-packages/reversion/migrations/0003_auto_20160601_1600.py", line 43, in set_version_db
    model = apps.get_model(app_label, model_name)
  File "/usr/local/lib/python3.5/dist-packages/django/apps/registry.py", line 197, in get_model
    return self.get_app_config(app_label).get_model(model_name.lower())
  File "/usr/local/lib/python3.5/dist-packages/django/apps/registry.py", line 155, in get_app_config
    raise LookupError(message)
LookupError: No installed app with label 'voting'.

Now this is mentioned in https://docs.djangoproject.com/en/dev/topics/migrations/#accessing-models-from-other-apps it seems that this https://github.com/etianen/django-reversion/blob/master/reversion/migrations/0003_auto_20160601_1600.py#L45 piece of code tries to work with the models… this is my model for reference: https://github.com/WebArchivCZ/Seeder/blob/master/Seeder/voting/models.py#L15

any idea what is happening here?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
tdruezcommented, Jun 29, 2016

@etianen 👍 for 2.0.5, working fine on my side.

1reaction
etianencommented, Jun 29, 2016

2.0.5 is now out.

On Tue, 28 Jun 2016 at 15:55 tdruez notifications@github.com wrote:

@etianen https://github.com/etianen your last 1f256b4 https://github.com/etianen/django-reversion/commit/1f256b4db56ca771a3951bed74574ce4e5da1e86 commit solved the LookupError: No installed app on my side. Thanks!

— You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/etianen/django-reversion/issues/543#issuecomment-229074815, or mute the thread https://github.com/notifications/unsubscribe/AAJFCFX3HWfd0Eo8TNPyCnWqQGiiKz-dks5qQTXigaJpZM4I3x1U .

Read more comments on GitHub >

github_iconTop Results From Across the Web

"No installed app with label 'admin'" running Django migration ...
LookupError : No installed app with label 'admin'. Using a debugger, I got that the 'admin' is not installed: ipdb> apps.get_apps() [] ipdb>...
Read more >
LookupError: No installed app with label 'admin' · Issue #805
Hi, I want to use djagno-reversion without django.contrib.admin app (using with DRF wihtout admin), but raise LookupError: No installed app ...
Read more >
"No installed app with label 'admin'" running Django migration ...
Django : " No installed app with label 'admin'" running Django migration. The app is installed correctly [ Beautify Your Computer ...
Read more >
Django migration error: No installed app with label 'myapp'
This usually happens when you use models from one app in another, as ForeignKey or ManyToMany etc. Django cannot add dependencies in ...
Read more >
LookupError: No installed app with label 'admin'.
I am new to django and am trying out the tutorial. Get the following error: Create a virtual environment using anaconda; Activate the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found