Closed nicoddemus closed 7 years ago
The error is produced by https://github.com/tox-dev/tox/pull/556 which is supposed to give more meaningful error messages fixing https://github.com/tox-dev/tox/issues/121 - looks like here it covers the actual problem in a different way. Seems hard to report a sensible error from there.
Just to make sure that this is not a tox regression: could you try this with tox 2.7?
Hmmm strange, it fails with:
ERROR: /home/travis/build/nicoddemus/pytest/tox.ini:194: requires pytest-2.0, actual pytest-0.1.dev289+g072f256'
ERROR: InvocationError: '/home/travis/build/nicoddemus/pytest/.tox/py34/bin/pytest --lsof -rfsxX testing'
For some reason the pytest development version is showing up as 0.1.dev289+g072f256
...
I don't think it is related to tox
, this build run a few days ago with tox-2.8.1
just fine.
Also from the logs in the description of travis-ci/travis-ci#8363, they are using the system's tox so it was not a new tox release which caused the problem.
O.k. thanks - just wanted to be sure, as that error message is 2.8+
FWIW I had some similar issue with qutebrowser, and specifying python: 3.5
fixed it. However, looks like pytest is already doing that...
@nicoddemus i suspect this is related to having collected enough commits since the last tag, that travis no longer includes a tag in the recent history
without tag, the git describe is wrong
This problem seems to be related to pyenv. It is mentioned in https://github.com/pyenv/pyenv-virtualenv/issues/202.
@gangefors points out a solution in their comment, which may help. Though I guess Travis should fix this.
Thanks @bittner. Python 3.5 was being used in a few secondary test environments and those were failing, so we got around this by testing those secondary environments with Python 3.6 instead
Fixed by #2785
@nicoddemus I think we need to reopen this bug, see https://travis-ci.org/pypa/virtualenv/jobs/283366066
I read it clear: it defines python3.6 as needed, but the installed version does not install python3.6 command so tox fails, translating to a total failure.
I bet that over 95% of Python projects are using tox, and we cannot blame tox for not finding the CLI.
@ssbarnea I'm not sure:
Setting environment variables from .travis.yml
$ export TOXENV=python3.6
This should be TOXENV=py36
no?
See https://github.com/travis-ci/travis-ci/issues/4990#issuecomment-334388582 and https://github.com/travis-ci/travis-ci/issues/8363#issuecomment-332666189 for related follow-ups.
The fix we applied in the behave-django project for that looks like this:
python: 3.6
...
before_install:
# work around https://github.com/travis-ci/travis-ci/issues/8363
- pyenv global system 3.5
...
Hope that helps. This is clearly a Travis image issue. They have to set up pyenv correctly.
this still does not help, i have pyenv global system 3.5
then pip3 install --user artifactory
and then i got ImportError: No module named 'artifactory'
in travis logs when trying to run my script with python3
. image set up as
- os: linux
dist: trusty
python: 3.5
@ysolovyov Does this reflect a problem re "Travis CI currently broken on some Python 3.5 environments"? I'm not sure. (What if you simply use pip
for installing? What if you omit the --user
option?)
For everyone landing here and looking for a solution to the Python/Travis issue:
I recommend switching to tox-travis and the native Travis build matrix capabilities. That does away with all the ugly workarounds.
See django-apptemplates for an implementation example (with an extensive build matrix and build stages).
Affects all
py35-*
environments,py35
works fine. So every tox environment which setsbasepython = python3.5
.Example failure:
Extracting the string literal from the message:
Which is the same error reported in travis-ci/travis-ci#8363.
Already tried this workaround but it failed with an strange problem: