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

Tox fails to run if the total directory path exceeds 80 characters. #649

Closed
tvalentyn opened this issue Oct 12, 2017 · 6 comments
Closed
Labels
bug:upstream something does not behave as it should, but can't or shouldn't be fixed in tox, but in a dependency

Comments

@tvalentyn
Copy link

tvalentyn commented Oct 12, 2017

BUG:

OS: Ubuntu 14.04
Tox: 2.9.1
Pip: 9.0.1
Virtualenv: 15.1.0

Steps to reproduce:

mkdir ~/projects/pad_80_charactersssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
cd ~/projects/pad_80_charactersssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
git clone https://github.com/apache/beam.git
cd beam/sdks/python
tox -e lint

Output:

raceback (most recent call last):
  File "/usr/local/bin/tox", line 11, in <module>
    sys.exit(cmdline())
  File "/usr/local/lib/python2.7/dist-packages/tox/session.py", line 40, in main
    retcode = Session(config).runcommand()
  File "/usr/local/lib/python2.7/dist-packages/tox/session.py", line 392, in runcommand
    return self.subcommand_test()
  File "/usr/local/lib/python2.7/dist-packages/tox/session.py", line 558, in subcommand_test
    if self.setupenv(venv):
  File "/usr/local/lib/python2.7/dist-packages/tox/session.py", line 457, in setupenv
    status = venv.update(action=action)
  File "/usr/local/lib/python2.7/dist-packages/tox/venv.py", line 176, in update
    self.hook.tox_testenv_install_deps(action=action, venv=self)
  File "/usr/local/lib/python2.7/dist-packages/pluggy.py", line 745, in __call__
    return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pluggy.py", line 339, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/usr/local/lib/python2.7/dist-packages/pluggy.py", line 334, in <lambda>
    _MultiCall(methods, kwargs, hook.spec_opts).execute()
  File "/usr/local/lib/python2.7/dist-packages/pluggy.py", line 614, in execute
    res = hook_impl.function(*args)
  File "/usr/local/lib/python2.7/dist-packages/tox/venv.py", line 457, in tox_testenv_install_deps
    venv._install(deps, action=action)
  File "/usr/local/lib/python2.7/dist-packages/tox/venv.py", line 335, in _install
    action=action)
  File "/usr/local/lib/python2.7/dist-packages/tox/venv.py", line 308, in run_install_command
    redirect=self.session.report.verbosity < 2)
  File "/usr/local/lib/python2.7/dist-packages/tox/venv.py", line 414, in _pcall
    redirect=redirect, ignore_ret=ignore_ret)
  File "/usr/local/lib/python2.7/dist-packages/tox/session.py", line 140, in popen
    stdout=stdout, stderr=subprocess.STDOUT)
  File "/usr/local/lib/python2.7/dist-packages/tox/session.py", line 228, in _popen
    stdout=stdout, stderr=stderr, env=env)
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
OSError: [Errno 13] Permission denied

Reducting the total path to directory containing tox.ini to 79 characters or less fixes the issue.
Possibly related: #66

@pawamoy
Copy link

pawamoy commented Oct 12, 2017

Yes I encoutered this limitation as well, but I think there's nothing tox can do. It's a system issue (with shebang length limit) or a setuptools and distlib issue (with the way it install packages / entry points).

The only workaround is to avoid too deep directory tree :/

Edit: there are other workarounds: pypa/pip#1773 (comment), also calling pip with python -m pip but this might not apply in tox case.

@tvalentyn
Copy link
Author

In this case I think it would be helpful if we identified the problem at the beginning of test suite execution, printed a meaningful error message explaining the limitations, and stopped the execution.

@obestwalter
Copy link
Member

Some kind of sanity check for all theses problems at the beginning of a tox run would definitely be helpful. There are quite a few of these things, which are not really tox bugs as such, but due to upstream problems or OS specific limitations.

@hpk42
Copy link

hpk42 commented Oct 19, 2017 via email

@frederickfung
Copy link

For anyone using Jenkins pipeline, it will surely be over 80 chars for the base-path and there's not much we can do about that.

@obestwalter obestwalter added the bug:upstream something does not behave as it should, but can't or shouldn't be fixed in tox, but in a dependency label Jan 23, 2018
@tvalentyn tvalentyn changed the title Tox fails to if the total directory path exceeds 80 characters. Tox fails to run if the total directory path exceeds 80 characters. Sep 10, 2018
@gaborbernat
Copy link
Member

This should now be fixed via #935

@tox-dev tox-dev locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug:upstream something does not behave as it should, but can't or shouldn't be fixed in tox, but in a dependency
Projects
None yet
Development

No branches or pull requests

6 participants