Notice: Undefined index: faq_title in /home/h247551/public_html/sadegh-khan/wp-content/plugins/ultimate-faqs/includes/Widgets.class.php on line 386
Notice: Undefined index: include_category in /home/h247551/public_html/sadegh-khan/wp-content/plugins/ultimate-faqs/includes/Widgets.class.php on line 394
A
حل ارور ImportError: cannot import name ‘python_2_unicode_compatible’ from ‘django.utils.encoding’
Posted
by
sadegh_khan
on
اسفند 12, 1398
زمان مطالعه: < 1 دقیقه
با سلام، من ارور رو به هنگام افزودن django-cities-light دریافت کردم:
ImportError: cannot import name 'python_2_unicode_compatible' from 'django.utils.encoding'
برای این منظور کافیه جایی که python_2_unicode_compatible را import کرده اید ویرایش کنید و به جای django.utils.encoding مقدار six را قرار دهید.
همانطور که در تصویر زیر ملاحظه می کنید:
آدرس فایل برای django-cities-light آدرس زیر می باشد:
cities_light/abstract_models.py
Category:
سوالات و مشکلات پایتون
Tag:
django-cities-light