[Django]-Error while loading data from fixture

3👍

The natural_key method should return a tuple, not a string.

def natural_key(self):
    return (self.name,)

If natural_key is a string "Andaman and Nicobar" instead of a tuple ('Andaman and Nicobar',) then *natural_key will unpack each of the 19 characters in the string as a separate argument. Along with self, that gives you 20 arguments from your error message.

Leave a comment