-
-
Notifications
You must be signed in to change notification settings - Fork 533
Tox/Pyenv failure upon creating virtualenv #644
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
Comments
I updated the title, this might not actually be due to a missing interpreter, but it's due to a different regression |
Hi @berdario thanks for the report, since when is that failing? Did anything change on your side? |
Looking at the error and the project there are several things that leave me veryconfused. The travis configuration does use pytest directly, so I have no idea why this is running tox at all. Can you explain? Even stranger: when I look at the current master build, my expectation fits what is going on in the build: pytest is used directly - no tox: https://travis-ci.org/berdario/pew/jobs/281829400 The error above contains the original exception message , which is
This is a known problem with pyenv that you need to use either tox-pyenv or register all python versions to make them accesssible from tox. But what does pyenv have to do with all of this? If Travis uses pyenv under the hood to provide the python versions, than there might be something going wrong. I have to admit that this is the weirdest thing I have seen in a long time, so I guess that there are things happening under the hood I don't understand. |
Sorry for the confusion, the .travis.yml has just been updated. This was its state as of yesterday: Yeah, it looks quite weird, since the build always used to succeed. I never used pyenv, and by seeing the error I thus thought that it was tox that was using pyenv I guess it might be possible that in the last 2 months Travis CI itself might have switched to use pyenv (from whatever solution they might have been previously using). Anyhow, I'd be fine on such Pythons to not be registered and available to Tox, but ideally it should then preserve the behavior of (it's not a big deal for me anymore, anyhow.... Since as you've seen we're not using Tox on TravisCI anymore) Thank you! |
Thanks for the clarification. I just had a look and Travis is actually using pyenv since 2014: https://blog.travis-ci.com/2014-04-28-upcoming-build-environment-updates/
So you might have triggered a corner case in their setup, as I never even have seen that they use pyenv under the hood, so this must work quite smoothly usually.
|
This is a duplicate to an issue I opened! |
Ah, so a Travis/pyenv config bug it is - seems to affect a lot of builds. |
I don't think it's a travis bug: I'm hitting the same issue with a local tox setup. Still trying to figure out what is actually happening. |
Okay, in my case, I had a |
Hi @schinckel - thanks for following up on that. Juggling with different versions and using pyenv has its own pitfalls I am afraid. |
Hi all, This errors occurs for me too over travis. but locally tox runs fine. I have not checked running travis' docker image locally. |
Hi @gauravv7, this is the same upstream problem that @asottile linked I guess: see travis-ci/travis-ci#8363 |
Reopened because the upstream bug at travis-ci/travis-ci#8363 is also still open. |
@obestwalter thanks for notifying here, I tried a fix for the same, and can put up a PR. It would be an honor to contribute further if you would allow me to :) |
@obestwalter ah, I usually err on closing issues that are not actionable here and just upstream problems (so our tracker isn't even more cluttered than it already is 😆). Up to you though :) |
Hey @asottile I think it is better to have them marked as upstream and keep them open, so that people looking for open bugs with that problem here hopefully find the open upstream bug :) |
Hi @gauravv7, what kind of fix would you have in mind? |
I think that this issue had nothing to do with travis itself because I found a way to reproduce it with my own rtox setup. Mainly I am randomly getting this error while running tox remotely on a Linux (RHEL-7.4) machine where I have pyenv installed. My main machine is MacOS where I also have tox and pyenv, a setup that works quite well as I have 6-7 different versions of python which I am testing with. To be clear: the chance of triggering the bug is like 1/5 executions, even if I wipe the .tox folder between each execution. The funny part is that his is never happening if I am manually running the command on the target machine, but when I run tox remotely (ssh) which makes me think that TTY type, environment var or shell can have an impact. |
i was able to fix this in a docker build here The "gist" of it all is below:
|
@cicorias another fix is to use |
I don't see any actionable item on our side, so I'll close this for now. |
even if
skip_missing_interpreters=True
This didn't use to be the case. The exact error message is:
See:
https://travis-ci.org/berdario/pew/jobs/281757929
I unfortunately don't have time to investigate much into it, but the TravisCI build link should have everything you need: you can see that previous builds passed just fine when the interpreter didn't exist, and in the repository you can find the
tox.ini
The text was updated successfully, but these errors were encountered: