Skip to content

tox4: .tox/.tox/bin/python: No module named tox #2409

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

Closed
ssbarnea opened this issue Apr 29, 2022 · 4 comments
Closed

tox4: .tox/.tox/bin/python: No module named tox #2409

ssbarnea opened this issue Apr 29, 2022 · 4 comments
Labels
bug:normal affects many people or has quite an impact
Milestone

Comments

@ssbarnea
Copy link
Member

While trying to force use of tox 4 beta on GHA, I found an interesting error which I was not able to reproduce locally.

Successfully installed ...
[295](https://github.com/ansible/ansible-lint/runs/6224866356?check_suite_focus=true#step:6:295)
ROOT: 30691 I exit 0 (30.15 seconds) /home/runner/work/ansible-lint/ansible-lint> python -I -m pip install -e '.[test]' pid=1651 [tox/execute/api.py:275]
[296](https://github.com/ansible/ansible-lint/runs/6224866356?check_suite_focus=true#step:6:296)
ROOT: 30692 W provision> .tox/.tox/bin/python -m tox --parallel auto --parallel-live --notest --skip-missing-interpreters false -vv [tox/tox_env/api.py:398]
[297](https://github.com/ansible/ansible-lint/runs/6224866356?check_suite_focus=true#step:6:297)
/home/runner/work/ansible-lint/ansible-lint/.tox/.tox/bin/python: No module named tox
[298](https://github.com/ansible/ansible-lint/runs/6224866356?check_suite_focus=true#step:6:298)

[299](https://github.com/ansible/ansible-lint/runs/6224866356?check_suite_focus=true#step:6:299)
Error: Process completed with exit code 1.

Full run at https://github.com/ansible/ansible-lint/runs/6224866356?check_suite_focus=true#step:6:297

I tried to run the same commands as GHA locally but I still did not get into this error so I am unsure what is causing it, especially as I seen all the steps before this point as succeeding in installing dependencies.

@ssbarnea ssbarnea added the bug:normal affects many people or has quite an impact label Apr 29, 2022
@gaborbernat
Copy link
Member

I can't tell what it's and without a reproducible is unactionable so I'll close it for now. We can reopen it when we ran into it again or we can reproduce it.

@ssbarnea
Copy link
Member Author

ssbarnea commented May 3, 2022

I updated the pull request to only upgrade tox and it does reproduce 100% of the time, see ansible/ansible-lint#2097

@ssbarnea
Copy link
Member Author

ssbarnea commented May 4, 2022

I was able to get more reproducing info. Apparently this happens only on Debian machines when you add a plugin requires. I removed my tox-extra plugin and it worked. I tried adding another plugin tox-gh and the behavior was the same, reproducing the bug:

# tox -e lint
ROOT: will run in automatically provisioned tox, host /usr/bin/python3 is missing [requires (has)]: tox-extra>=0.4.0
ROOT: provision> .tox/.tox/bin/python -m tox -e lint
/root/.cache/.rmux/ansible-lint/.tox/.tox/bin/python: No module named tox

As both plugins reproduced the issue, I would rule-out them being the cause for the failure.

Note: i tested locally with a clean Debian 11 (bullseye) but GHA is using Ubuntu, thus I concluded that it should be either Debian or Linux, as on MacOS it worked just fine.

@gaborbernat gaborbernat added this to the 4.0 milestone May 8, 2022
@ssbarnea
Copy link
Member Author

This but is likely a duplicate of #2414 which is better described.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:normal affects many people or has quite an impact
Projects
None yet
Development

No branches or pull requests

2 participants