Unwanted comma on line 609 results in code being set to a tuple rather than a string. https://github.com/coderholic/django-cities/blob/c811bbbe2b509d99d2ea025fa1e7106330a90e51/cities/management/commands/cities.py#L608-L609 A comma makes it a tuple (no need for parent, all it takes is one comma). Solution is to remove the comma from the end of the line. I can do that for you if you want?