File "/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/tox/action.py", line 107, in popen
lines = out_path.read().split("\n")
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 7297: ordinal not in range(128)
Possibly connected to having unicode characters in a filename with-in the package.
Only fails on Python 2.7, succeeds on all Python 3 builds.
The text was updated successfully, but these errors were encountered:
Because that file has unicode_literals enabled, those "\n" string literals are Unicode strings. But because we're on Python 2, the result of read()ing a file is a bytestring.
I think the right fix is to use bytestrings for those "\n" literals on Python 2 but Unicode strings on Python 3. This is sometimes called "native strings," and unicode_literals makes this hard. Future has as_native_str, but I don't (on a cursory glance) see an equivalent utility in six.