pinax / pinax-blog

a blog app for Django
MIT License
465 stars 153 forks source link

django 3.0.4 - cannot import name 'python_2_unicode_compatible' #128

Closed dannyblaker closed 4 years ago

dannyblaker commented 4 years ago

import error installing with django 3.0.4: cannot import name 'python_2_unicode_compatible' from 'django.utils.encoding

Issue: Django 3 has removed the django.utils.encoding.python_2_unicode_compatible() api.

Solution: in blog\models.py and images\models.py:

replace: from django.utils.encoding import python_2_unicode_compatible with: from six import python_2_unicode_compatible

🌻

KatherineMichel commented 4 years ago

Thank you for your issue. @mfonism might be working on fixing that. Not sure. If not, I'm happy to receive a PR from you to fix, if you are interested.

mfonism commented 4 years ago

Hi @dannyblaker,

I've made plans to work on this issue (and other related issues) this weekend.

But if you have a PR for it, or are already working on one, (or are even planning to work on one 🙈), please let @KatherineMichel know, so we can channel our efforts into fixing other issues.

Thank you for your issue.

KatherineMichel commented 4 years ago

@dannyblaker... a new release has been tagged and published. Thank you! https://pypi.org/project/pinax-blog/

dannyblaker commented 4 years ago

@dannyblaker... a new release has been tagged and published. Thank you! https://pypi.org/project/pinax-blog/

Awesome! Many Thanks @KatherineMichel @mfonism & everyone :)

IamOmaR22 commented 4 years ago

Use - from six import python_2_unicode_compatible

Instead of - from django.utils.encoding import python_2_unicode_compatible

I hope it will solve the problem.