coderholic / django-cities

Countries and cities of the world for Django projects
MIT License
913 stars 377 forks source link

ImportError: cannot import name 'python_2_unicode_compatible' from 'django.utils.encoding' #216

Closed sweta-creoit closed 4 years ago

sweta-creoit commented 4 years ago

Checklist

Steps to reproduce

ERROR:(/cities/models.py) from django.utils.encoding import python_2_unicode_compatible ImportError: cannot import name 'python_2_unicode_compatible' from 'django.utils.encoding'

As per latest version of Django==Django==3.0.2, the python_2_unicode_compatible has been moved to six.py , need to get updated So that django-cities/models.py can pick from six.py package.

Expected behavior

In /cities/models.py , the import should be: from six import python_2_unicode_compatible

Actual behavior

In /cities/models.py , the import is: from django.utils.encoding import python_2_unicode_compatible

blag commented 4 years ago

Hi @sweta-creoit. I get emailed every time you open an issue and close an issue. Instead of closing this issue and immediately opening #217, you could have simply edited this issue's title and/or description.

Thank you for filling out the issue template. However, you obviously didn't search for similar issues, as indicated in the issue template, because you would have found #215 very easily. In the future, please search through issues before opening a new one.

But no worries! I'll just respond to the issue in #217. 😄