vdboor
vdboor

Reputation: 22526

Strange build error on Travis, local tests in tox work

I have a strange error on Travis, the builds of https://travis-ci.org/edoburu/django-fluent-blogs fail in Django 1.7 and lower with:

from django.utils.six import python_2_unicode_compatible

ImportError: cannot import name 'python_2_unicode_compatible'

This is importable for every Django version the build tests against, and somehow only works for Django 1.8. Running tests locally with tox works.

Any idea's why this happens?

Upvotes: 1

Views: 107

Answers (1)

Ajeet Shah
Ajeet Shah

Reputation: 19813

Try with django.utils.encoding:

from django.utils.encoding import python_2_unicode_compatible

Upvotes: 1

Related Questions