Opened 7 years ago

Closed 7 years ago

#26937 closed Bug (needsinfo)

'NoneType' object has no attribute '_meta' in dumpdata auth.user

Reported by: Jerome Leclanche Owned by: nobody
Component: Uncategorized Version: 1.10
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


In 1.10rc1 I get the following when running ./ dumpdata auth.user --traceback::

[Traceback (most recent call last):
  File "./", line 11, in <module>
  File "/home/adys/.local/share/virtualenvs/hs/lib/python3.5/site-packages/django/core/management/", line 367, in execute_from_command_line
  File "/home/adys/.local/share/virtualenvs/hs/lib/python3.5/site-packages/django/core/management/", line 359, in execute
  File "/home/adys/.local/share/virtualenvs/hs/lib/python3.5/site-packages/django/core/management/", line 305, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/home/adys/.local/share/virtualenvs/hs/lib/python3.5/site-packages/django/core/management/", line 356, in execute
    output = self.handle(*args, **options)
  File "/home/adys/.local/share/virtualenvs/hs/lib/python3.5/site-packages/django/core/management/commands/", line 200, in handle
  File "/home/adys/.local/share/virtualenvs/hs/lib/python3.5/site-packages/django/core/serializers/", line 129, in serialize
    s.serialize(queryset, **options)
  File "/home/adys/.local/share/virtualenvs/hs/lib/python3.5/site-packages/django/core/serializers/", line 79, in serialize
    for count, obj in enumerate(queryset, start=1):
  File "/home/adys/.local/share/virtualenvs/hs/lib/python3.5/site-packages/django/core/management/commands/", line 161, in get_objects
    models = serializers.sort_dependencies(app_list.items())
  File "/home/adys/.local/share/virtualenvs/hs/lib/python3.5/site-packages/django/core/serializers/", line 195, in sort_dependencies
    if field.remote_field.through._meta.auto_created:
AttributeError: 'NoneType' object has no attribute '_meta'

For reference, here is my user model:

Change History (2)

comment:1 Changed 7 years ago by Tim Graham

Can you try to put together a minimal sample project to reproduce the crash and bisect to determine where the behavior changed?

comment:2 Changed 7 years ago by Tim Graham

Resolution: needsinfo
Status: newclosed

Sorry, but the project you provide is too complex and I'm spending too much time trying to debug this. Reopen if you can put together a more minimal project that reproduces the problem and hopefully also bisect to find the commit where things changed. Thanks!

Note: See TracTickets for help on using tickets.
Back to Top