tox fails if path to project dir contains non-ASCII characters

Issue #291 on hold
Feuermurmel created an issue

To test, I create a trivial setup.py

import setuptools
setuptools.setup()

… and an equally trivial tox.ini:

[tox]
envlist = py34

Running tox produces the following error:

michi ~/ä$ tox
GLOB sdist-make: /Users/michi/ä/setup.py
py34 create: /Users/michi/ä/.tox/py34
ERROR: invocation failed (exit code 1), logfile: /Users/michi/ä/.tox/py34/log/py34-0.log
ERROR: actionid: py34
msg: getenv
cmdargs: ['/opt/local/Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4', '-m', 'virtualenv', '--python', '/opt/local/bin/python3.4', 'py34']
env: {'VIRTUAL_ENV': '/Users/michi/ä/.tox/py34', 'PATH': '/Users/michi/ä/.tox/py34/bin:/Users/michi/opt/bin/native/Darwin:/Users/michi/opt/bin:/opt/local/bin:/opt/local/sbin:/opt/local/libexec/gnubin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/MacGPG2/bin:/usr/local/bin', 'TMPDIR': '/var/folders/dy/tjw4y9qj127crhw6pzmcl_lh0000gq/T/', 'PYTHONHASHSEED': '274154285'}

Using base prefix '/opt/local/Library/Frameworks/Python.framework/Versions/3.4'
New python executable in py34/bin/python3.4
Also creating executable in py34/bin/python
Installing setuptools, pip, wheel...
...Installing setuptools, pip, wheel...done.
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/virtualenv.py", line 2363, in <module>
    main()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/virtualenv.py", line 832, in main
    symlink=options.symlink)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/virtualenv.py", line 1004, in create_environment
    install_wheel(to_install, py_executable, search_dirs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/virtualenv.py", line 969, in install_wheel
    'PIP_NO_INDEX': '1'
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/virtualenv.py", line 906, in call_subprocess
    logger.notify('Complete output from command %s:' % cmd_desc)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/virtualenv.py", line 328, in notify
    self.log(self.NOTIFY, msg, *args, **kw)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/virtualenv.py", line 356, in log
    consumer.write(rendered+'\n')
UnicodeEncodeError: 'ascii' codec can't encode character '\xe4' in position 44: ordinal not in range(128)
Running virtualenv with interpreter /opt/local/bin/python3.4

ERROR: InvocationError: /opt/local/Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4 -m virtualenv --python /opt/local/bin/python3.4 py34 (see /Users/michi/ä/.tox/py34/log/py34-0.log)
___________________________________ summary ____________________________________
ERROR:   py34: InvocationError: /opt/local/Library/Frameworks/Python.framework/Versions/3.4/bin/python3.4 -m virtualenv --python /opt/local/bin/python3.4 py34 (see /Users/michi/ä/.tox/py34/log/py34-0.log)
michi ~/ä$ 

Moving the project directory so its path only contains ASCII characters resolves the problem. This happens with tox 2.0.1 on OS X 10.9.5.

Comments (2)

  1. Log in to comment