Please how do I fix this error that comes up when loading data. See the
error message below.
Thanks
Traceback (most recent call last):
File
"/app/.heroku/python/lib/python3.9/site-packages/django/contrib/contenttypes/models.py",
line 19, in get_by_natural_key
ct = self._cache[self.db][(app_label, model)]
KeyError: ('courses', 'course')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File
"/app/.heroku/python/lib/python3.9/site-packages/django/core/serializers/base.py",
line 245, in save_deferred_fields
value = deserialize_fk_value(field, field_value, using,
handle_forward_references=False)
File
"/app/.heroku/python/lib/python3.9/site-packages/django/core/serializers/base.py",
line 310, in deserialize_fk_value
obj = default_manager.db_manager(using).get_by_natural_key(*field_value)
File
"/app/.heroku/python/lib/python3.9/site-packages/django/contrib/contenttypes/models.py",
line 21, in get_by_natural_key
ct = self.get(app_label=app_label, model=model)
File
"/app/.heroku/python/lib/python3.9/site-packages/django/db/models/manager.py",
line 85, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File
"/app/.heroku/python/lib/python3.9/site-packages/django/db/models/query.py",
line 435, in get
raise self.model.DoesNotExist(
django.contrib.contenttypes.models.DoesNotExist: ContentType matching query
does not exist.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/manage.py", line 22, in <module>
main()
File "/app/manage.py", line 18, in main
execute_from_command_line(sys.argv)
File
"/app/.heroku/python/lib/python3.9/site-packages/django/core/management/__init__.py",
line 419, in execute_from_command_line
utility.execute()
File
"/app/.heroku/python/lib/python3.9/site-packages/django/core/management/__init__.py",
line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File
"/app/.heroku/python/lib/python3.9/site-packages/django/core/management/base.py",
line 354, in run_from_argv
self.execute(*args, **cmd_options)
File
"/app/.heroku/python/lib/python3.9/site-packages/django/core/management/base.py",
line 398, in execute
output = self.handle(*args, **options)
File
"/app/.heroku/python/lib/python3.9/site-packages/django/core/management/commands/loaddata.py",
line 78, in handle
self.loaddata(fixture_labels)
File
"/app/.heroku/python/lib/python3.9/site-packages/django/core/management/commands/loaddata.py",
line 125, in loaddata
obj.save_deferred_fields(using=self.using)
File
"/app/.heroku/python/lib/python3.9/site-packages/django/core/serializers/base.py",
line 247, in save_deferred_fields
raise DeserializationError.WithData(e, label, self.object.pk,
field_value)
django.core.serializers.base.DeserializationError: ContentType matching
query does not exist.: (admin.logentry:pk=1) field_value was '['courses',
'course']
--
You received this message because you are subscribed to the Google Groups
"Django users" 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-users/ed5b5616-d5c9-4b13-8829-8962d9c8bb5dn%40googlegroups.com.