OSX xcode11.3 j2 not found / bintray deploy fail

a subset of my travis.yml contains:

  - if [ "$TRAVIS_OS_NAME" == "osx" ]; then export PATH="$HOME/Library/Python/3.8/bin:$PATH"; fi

  - pip3 -q install --user --upgrade j2cli # install pip

which succeeds.

Travis succeeds in creating .dmg file, but travis logs show the following:
./.travis.sh: line 42: j2: command not found
which had worked for days or more prior.

then fails to deploy.

i am uncertain of a solution, googles fail me, i’m not travis adept.

build URL:

Hello @neCo,

Try adding travis_wait 20 in your .travis.yml file.

See if that gives you any different results.

j2 (Jinja2) is not a preinstalled tool, you install it yourself. So you are responsible to make sure that it’s installed properly, compatible with the system etc.

In the linked build, the command that installs it diligently gives you a warning that the resulting script is not on PATH:

WARNING: The script j2 is installed in ‘/Users/travis/Library/Python/3.7/bin’ which is not on PATH.

Since there’s no preinstalled Python on ~/Library/Python (at least, nothing but Homebrew’s python and pyenv formulae is guaranteed), this installation must also be something that you are adding yourself, or something that may happen to be present but not guaranteed.
In this particular case, it looks like you are expecting a Python 3.8 to be preinstalled there, but in this case, a 3.7 is present instead. Since either is not an official guarantee, it’s your job to devise a build logic to handle any possible case.

1 Like

As an aside, you must have missed that warning message because it’s collapsed by default.

So I suggest looking at the raw log instead to detect abnormabilities. Not only doesn’t it collapse anything, it also doesn’t delete any text that could have been overwritten with terminal control characters (they are typically used to create dynamic effects like progress bars but can result in hiding useful info in case of malfunctions).

1 Like

thanks everyone travis-ci is a learning curve for me. (in addition to having no access to OSX)
my problem was solved by adding python 3.7 in the path, but i think there are other solutions that i’ll investigate too (brew updates, etc)
maybe j2 alternative?