title: Django fails to loaddata with deserialization error
body: <p>I am running Wagtail which runs on django and when running the <code>dumpdata</code> the following occurs</p>
  <pre><code>python manage.py dumpdata --indent 2 --output dumps.json
  CommandError: Unable to serialize database: no such table: wagtailimages_uploadedimage
  </code></pre>
  <p>After that I delete the sqlite database and remove the migrations from the apps <code>migrations</code> directory so I can have an empty database and test the dumped data. After running <code>migrate</code> I execute  <code>loaddata dump1.json</code> and the following error comes up</p>
  <pre><code>Tracking file by folder pattern:  migrations
  Traceback (most recent call last):
    File &quot;/home/user/Desktop/projects/mytestwebapp/venv/lib/python3.8/site-packages/django/core/serializers/json.py&quot;, line 68, in Deserializer
      objects = json.loads(stream_or_string)
    File &quot;/usr/lib/python3.8/json/__init__.py&quot;, line 357, in loads
      return _default_decoder.decode(s)
    File &quot;/usr/lib/python3.8/json/decoder.py&quot;, line 337, in decode
      obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File &quot;/usr/lib/python3.8/json/decoder.py&quot;, line 355, in raw_decode
      raise JSONDecodeError(&quot;Expecting value&quot;, s, err.value) from None
  json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
  
  The above exception was the direct cause of the following exception:
  
  Traceback (most recent call last):
    File &quot;/opt/pycharm-professional/plugins/python/helpers/pycharm/django_manage.py&quot;, line 52, in &lt;module&gt;
      run_command()
    File &quot;/opt/pycharm-professional/plugins/python/helpers/pycharm/django_manage.py&quot;, line 46, in run_command
      run_module(manage_file, None, '__main__', True)
    File &quot;/usr/lib/python3.8/runpy.py&quot;, line 207, in run_module
      return _run_module_code(code, init_globals, run_name, mod_spec)
    File &quot;/usr/lib/python3.8/runpy.py&quot;, line 97, in _run_module_code
      _run_code(code, mod_globals, init_globals,
    File &quot;/usr/lib/python3.8/runpy.py&quot;, line 87, in _run_code
      exec(code, run_globals)
    File &quot;/home/user/Desktop/projects/mytestwebapp/manage.py&quot;, line 10, in &lt;module&gt;
      execute_from_command_line(sys.argv)
    File &quot;/home/user/Desktop/projects/mytestwebapp/venv/lib/python3.8/site-packages/django/core/management/__init__.py&quot;, line 381, in execute_from_command_line
      utility.execute()
    File &quot;/home/user/Desktop/projects/mytestwebapp/venv/lib/python3.8/site-packages/django/core/management/__init__.py&quot;, line 375, in execute
      self.fetch_command(subcommand).run_from_argv(self.argv)
    File &quot;/home/user/Desktop/projects/mytestwebapp/venv/lib/python3.8/site-packages/django/core/management/base.py&quot;, line 323, in run_from_argv
      self.execute(*args, **cmd_options)
    File &quot;/home/user/Desktop/projects/mytestwebapp/venv/lib/python3.8/site-packages/django/core/management/base.py&quot;, line 364, in execute
      output = self.handle(*args, **options)
    File &quot;/home/user/Desktop/projects/mytestwebapp/venv/lib/python3.8/site-packages/django/core/management/commands/loaddata.py&quot;, line 72, in handle
      self.loaddata(fixture_labels)
    File &quot;/home/user/Desktop/projects/mytestwebapp/venv/lib/python3.8/site-packages/django/core/management/commands/loaddata.py&quot;, line 114, in loaddata
      self.load_label(fixture_label)
    File &quot;/home/user/Desktop/projects/mytestwebapp/venv/lib/python3.8/site-packages/django/core/management/commands/loaddata.py&quot;, line 172, in load_label
      for obj in objects:
    File &quot;/home/user/Desktop/projects/mytestwebapp/venv/lib/python3.8/site-packages/django/core/serializers/json.py&quot;, line 73, in Deserializer
      raise DeserializationError() from exc
  django.core.serializers.base.DeserializationError: Problem installing fixture '/home/user/Desktop/projects/mytestwebapp/dump1.json': 
  </code></pre>
  <p>I have tried also to exclude some of the things i dont need while dumping, using the following</p>
  <pre><code>dumpdata --natural-foreign --indent 2 -e contenttypes -e auth.permission -e wagtailcore.groupcollectionpermission -e wagtailcore.grouppagepermission -e wagtailimages.rendition -e sessions &gt; dump1.json
  </code></pre>
  <p>But it didnt make any difference.</p>
  <p>The application is a simple blog following the demo shown <a href="https://docs.wagtail.io/en/v2.9/getting_started/tutorial.html" rel="nofollow noreferrer">here</a>.</p>