Running ./manage.py migrate auth did not work for me at first, and every ./manage.py command ./manage.py this error. My problem was that I was doing things with the Group manager in the module area.
If you have code like this in the scope of a module:
customers_group = Group.objects.get(name='customers')
Move it inside the function that is called at runtime.
def xyz(): ... customers_group = Group.objects.get(name='customers')
source share