Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

django 3.0.4 - cannot import name 'python_2_unicode_compatible' #128

Closed
dannyblaker opened this issue Mar 11, 2020 · 5 comments
Closed

django 3.0.4 - cannot import name 'python_2_unicode_compatible' #128

dannyblaker opened this issue Mar 11, 2020 · 5 comments
Labels

Comments

@dannyblaker
Copy link

dannyblaker commented Mar 11, 2020

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
Copy link
Member

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
Copy link
Contributor

mfonism commented Mar 12, 2020

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
Copy link
Member

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

@dannyblaker
Copy link
Author

dannyblaker commented Jul 19, 2020

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

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

@IamOmaR22
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants