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

pants.pex not found #19

Closed
tcfuji opened this issue Apr 6, 2014 · 14 comments
Closed

pants.pex not found #19

tcfuji opened this issue Apr 6, 2014 · 14 comments
Assignees

Comments

@tcfuji
Copy link

tcfuji commented Apr 6, 2014

Using OS X. After executing ./pants:

Traceback (most recent call last):
  File "src/python/pants/bin/pants_exe.py", line 19, in <module>
    from pants.commands.register import register_commands
  File "~/Desktop/GitStuff/pants/src/python/pants/commands/register.py", line 8, in <module>
    from pants.commands.goal import Goal
  File "~/Desktop/GitStuff/pants/src/python/pants/commands/goal.py", line 36, in <module>
    from pants.engine.engine import Engine
ImportError: No module named engine
./pants: line 90: ~/Desktop/GitStuff/pants/pants.pex: No such file or directory
./pants: line 90: exec: ~/Desktop/GitStuff/pants/pants.pex: cannot execute: No such file or directory
@jsirois
Copy link
Contributor

jsirois commented Apr 7, 2014

A bit more info will help us debug.
Please provide:

  • branch / sha

Also try:

./build-support/python/clean.sh && PANTS_VERBOSE=1 PEX_VERBOSE=1 PYTHON_VERBOSE=5 ./pants

@jsirois jsirois self-assigned this Apr 7, 2014
@tcfuji
Copy link
Author

tcfuji commented Apr 7, 2014

After executing ./build-support/python/clean.sh && PANTS_VERBOSE=1 PEX_VERBOSE=1 PYTHON_VERBOSE=5 ./pants:

Building pants.pex to ~/Desktop/GitStuff/pants/pants.pex...
./pants: line 35: ~/Desktop/GitStuff/pants/build-support/pants_deps.venv/bin/activate: No such file or directory
Traceback (most recent call last):
  File "src/python/pants/bin/pants_exe.py", line 19, in <module>
    from pants.commands.register import register_commands
  File "~/Desktop/GitStuff/pants/src/python/pants/commands/register.py", line 8, in <module>
    from pants.commands.goal import Goal
  File "~/Desktop/GitStuff/pants/src/python/pants/commands/goal.py", line 36, in <module>
    from pants.engine.engine import Engine
ImportError: No module named engine
./pants: line 90: ~/Desktop/GitStuff/pants/pants.pex: No such file or directory
./pants: line 90: exec: ~/Desktop/GitStuff/pants/pants.pex: cannot execute: No such file or directory

Also, I used an Anaconda Python virtual environment if it matters.

@jsirois
Copy link
Contributor

jsirois commented Apr 8, 2014

Ok - thanks. That still less log output than I would have expected. Assuming you first tuck away un-added changes you may have with a git stash, please try this and include full output:

git clean -fdx && ./build-support/python/clean.sh && PANTS_VERBOSE=1 PEX_VERBOSE=1 PYTHON_VERBOSE=5 ./pants:

Also a friendly nudge to include the branch you're using (must be on origin so we can help) plus its tip sha.

@tcfuji
Copy link
Author

tcfuji commented Apr 8, 2014

git clean -fdx && ./build-support/python/clean.sh && PANTS_VERBOSE=1 PEX_VERBOSE=1 PYTHON_VERBOSE=5 ./pants output:

$ git clean -fdx && ./build-support/python/clean.sh && PANTS_VERBOSE=1 PEX_VERBOSE=1 PYTHON_VERBOSE=5 ./pants
Removing build-support/virtualenv-1.11.4.tar.gz
Building pants.pex to /Users/tf/Desktop/GitStuff/pants/pants.pex...
Bootstrapping pants_deps with requirements:
  /Users/tf/Desktop/GitStuff/pants/3rdparty/python/requirements.txt
  /Users/tf/Desktop/GitStuff/pants/3rdparty/python/twitter/commons/requirements.txt
Using /Users/tf/anaconda/envs/Pants/bin/python2.7
~/Desktop/GitStuff/pants/build-support ~/Desktop/GitStuff/pants
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1716k  100 1716k    0     0   543k      0  0:00:03  0:00:03 --:--:--  543k
x virtualenv-1.11.4/
x virtualenv-1.11.4/AUTHORS.txt
x virtualenv-1.11.4/bin/
x virtualenv-1.11.4/bin/rebuild-script.py
x virtualenv-1.11.4/docs/
x virtualenv-1.11.4/docs/conf.py
x virtualenv-1.11.4/docs/index.rst
x virtualenv-1.11.4/docs/make.bat
x virtualenv-1.11.4/docs/Makefile
x virtualenv-1.11.4/docs/news.rst
x virtualenv-1.11.4/docs/virtualenv.rst
x virtualenv-1.11.4/LICENSE.txt
x virtualenv-1.11.4/MANIFEST.in
x virtualenv-1.11.4/PKG-INFO
x virtualenv-1.11.4/README.rst
x virtualenv-1.11.4/scripts/
x virtualenv-1.11.4/scripts/virtualenv
x virtualenv-1.11.4/setup.cfg
x virtualenv-1.11.4/setup.py
x virtualenv-1.11.4/virtualenv.egg-info/
x virtualenv-1.11.4/virtualenv.egg-info/dependency_links.txt
x virtualenv-1.11.4/virtualenv.egg-info/entry_points.txt
x virtualenv-1.11.4/virtualenv.egg-info/not-zip-safe
x virtualenv-1.11.4/virtualenv.egg-info/PKG-INFO
x virtualenv-1.11.4/virtualenv.egg-info/SOURCES.txt
x virtualenv-1.11.4/virtualenv.egg-info/top_level.txt
x virtualenv-1.11.4/virtualenv.py
x virtualenv-1.11.4/virtualenv_embedded/
x virtualenv-1.11.4/virtualenv_embedded/activate.bat
x virtualenv-1.11.4/virtualenv_embedded/activate.csh
x virtualenv-1.11.4/virtualenv_embedded/activate.fish
x virtualenv-1.11.4/virtualenv_embedded/activate.ps1
x virtualenv-1.11.4/virtualenv_embedded/activate.sh
x virtualenv-1.11.4/virtualenv_embedded/activate_this.py
x virtualenv-1.11.4/virtualenv_embedded/deactivate.bat
x virtualenv-1.11.4/virtualenv_embedded/distutils-init.py
x virtualenv-1.11.4/virtualenv_embedded/distutils.cfg
x virtualenv-1.11.4/virtualenv_embedded/site.py
x virtualenv-1.11.4/virtualenv_support/
x virtualenv-1.11.4/virtualenv_support/__init__.py
x virtualenv-1.11.4/virtualenv_support/pip-1.5.4-py2.py3-none-any.whl
x virtualenv-1.11.4/virtualenv_support/setuptools-2.2-py2.py3-none-any.whl
~/Desktop/GitStuff/pants
New python executable in /Users/tf/Desktop/GitStuff/pants/build-support/pants_deps.venv/bin/python2.7
Also creating executable in /Users/tf/Desktop/GitStuff/pants/build-support/pants_deps.venv/bin/python
Installing setuptools, pip...
  Complete output from command /Users/tf/Desktop/Gi...s.venv/bin/python2.7 -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip:
  Ignoring indexes: https://pypi.python.org/simple/
Exception:
Traceback (most recent call last):
  File "/Users/tf/Desktop/GitStuff/pants/build-support/virtualenv-1.11.4/virtualenv_support/pip-1.5.4-py2.py3-none-any.whl/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/Users/tf/Desktop/GitStuff/pants/build-support/virtualenv-1.11.4/virtualenv_support/pip-1.5.4-py2.py3-none-any.whl/pip/commands/install.py", line 236, in run
    session = self._build_session(options)
  File "/Users/tf/Desktop/GitStuff/pants/build-support/virtualenv-1.11.4/virtualenv_support/pip-1.5.4-py2.py3-none-any.whl/pip/basecommand.py", line 52, in _build_session
    session = PipSession()
  File "/Users/tf/Desktop/GitStuff/pants/build-support/virtualenv-1.11.4/virtualenv_support/pip-1.5.4-py2.py3-none-any.whl/pip/download.py", line 216, in __init__
    super(PipSession, self).__init__(*args, **kwargs)
  File "/Users/tf/Desktop/GitStuff/pants/build-support/virtualenv-1.11.4/virtualenv_support/pip-1.5.4-py2.py3-none-any.whl/pip/_vendor/requests/sessions.py", line 200, in __init__
    self.headers = default_headers()
  File "/Users/tf/Desktop/GitStuff/pants/build-support/virtualenv-1.11.4/virtualenv_support/pip-1.5.4-py2.py3-none-any.whl/pip/_vendor/requests/utils.py", line 550, in default_headers
    'User-Agent': default_user_agent(),
  File "/Users/tf/Desktop/GitStuff/pants/build-support/virtualenv-1.11.4/virtualenv_support/pip-1.5.4-py2.py3-none-any.whl/pip/_vendor/requests/utils.py", line 519, in default_user_agent
    _implementation = platform.python_implementation()
  File "/Users/tf/anaconda/envs/Pants/lib/python2.7/platform.py", line 1499, in python_implementation
    return _sys_version()[0]
  File "/Users/tf/anaconda/envs/Pants/lib/python2.7/platform.py", line 1464, in _sys_version
    repr(sys_version))
ValueError: failed to parse CPython sys.version: '2.7.5 (default, Aug 25 2013, 00:04:04) \n[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)]'

Storing debug log for failure in /Users/tf/.pip/pip.log
----------------------------------------
...Installing setuptools, pip...done.
Traceback (most recent call last):
  File "/Users/tf/Desktop/GitStuff/pants/build-support/virtualenv-1.11.4/virtualenv.py", line 2338, in <module>
    main()
  File "/Users/tf/Desktop/GitStuff/pants/build-support/virtualenv-1.11.4/virtualenv.py", line 824, in main
    symlink=options.symlink)
  File "/Users/tf/Desktop/GitStuff/pants/build-support/virtualenv-1.11.4/virtualenv.py", line 992, in create_environment
    install_wheel(to_install, py_executable, search_dirs)
  File "/Users/tf/Desktop/GitStuff/pants/build-support/virtualenv-1.11.4/virtualenv.py", line 960, in install_wheel
    'PIP_NO_INDEX': '1'
  File "/Users/tf/Desktop/GitStuff/pants/build-support/virtualenv-1.11.4/virtualenv.py", line 902, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command /Users/tf/Desktop/Gi...s.venv/bin/python2.7 -c "import sys, pip; sys...d\"] + sys.argv[1:]))" setuptools pip failed with error code 2
./pants: line 35: /Users/tf/Desktop/GitStuff/pants/build-support/pants_deps.venv/bin/activate: No such file or directory
Requirement already satisfied (use --upgrade to upgrade): ansicolors==1.0.2 in /Users/tf/anaconda/envs/Pants/lib/python2.7/site-packages (from -r /Users/tf/Desktop/GitStuff/pants/3rdparty/python/requirements.txt (line 1))
Requirement already satisfied (use --upgrade to upgrade): antlr-python-runtime==3.1.3 in /Users/tf/anaconda/envs/Pants/lib/python2.7/site-packages (from -r /Users/tf/Desktop/GitStuff/pants/3rdparty/python/requirements.txt (line 3))
Requirement already satisfied (use --upgrade to upgrade): coverage==3.7.1 in /Users/tf/anaconda/envs/Pants/lib/python2.7/site-packages (from -r /Users/tf/Desktop/GitStuff/pants/3rdparty/python/requirements.txt (line 7))
Requirement already satisfied (use --upgrade to upgrade): elementtree==1.2.7-20070827-preview in /Users/tf/anaconda/envs/Pants/lib/python2.7/site-packages (from -r /Users/tf/Desktop/GitStuff/pants/3rdparty/python/requirements.txt (line 9))
Requirement already satisfied (use --upgrade to upgrade): Markdown==2.1.1 in /Users/tf/anaconda/envs/Pants/lib/python2.7/site-packages (from -r /Users/tf/Desktop/GitStuff/pants/3rdparty/python/requirements.txt (line 13))
Requirement already satisfied (use --upgrade to upgrade): mock==1.0.1 in /Users/tf/anaconda/envs/Pants/lib/python2.7/site-packages (from -r /Users/tf/Desktop/GitStuff/pants/3rdparty/python/requirements.txt (line 14))
Requirement already satisfied (use --upgrade to upgrade): mox==0.5.3 in /Users/tf/anaconda/envs/Pants/lib/python2.7/site-packages (from -r /Users/tf/Desktop/GitStuff/pants/3rdparty/python/requirements.txt (line 15))
Requirement already satisfied (use --upgrade to upgrade): psutil==1.1.2 in /Users/tf/anaconda/envs/Pants/lib/python2.7/site-packages (from -r /Users/tf/Desktop/GitStuff/pants/3rdparty/python/requirements.txt (line 16))
Requirement already satisfied (use --upgrade to upgrade): Pygments==1.4 in /Users/tf/anaconda/envs/Pants/lib/python2.7/site-packages (from -r /Users/tf/Desktop/GitStuff/pants/3rdparty/python/requirements.txt (line 17))
Requirement already satisfied (use --upgrade to upgrade): pystache==0.5.3 in /Users/tf/anaconda/envs/Pants/lib/python2.7/site-packages (from -r /Users/tf/Desktop/GitStuff/pants/3rdparty/python/requirements.txt (line 18))
Requirement already satisfied (use --upgrade to upgrade): pytest==2.5.2 in /Users/tf/anaconda/envs/Pants/lib/python2.7/site-packages (from -r /Users/tf/Desktop/GitStuff/pants/3rdparty/python/requirements.txt (line 19))
Requirement already satisfied (use --upgrade to upgrade): pytest-cov==1.6 in /Users/tf/anaconda/envs/Pants/lib/python2.7/site-packages (from -r /Users/tf/Desktop/GitStuff/pants/3rdparty/python/requirements.txt (line 20))
Requirement already satisfied (use --upgrade to upgrade): python-daemon==1.5.5 in /Users/tf/anaconda/envs/Pants/lib/python2.7/site-packages (from -r /Users/tf/Desktop/GitStuff/pants/3rdparty/python/requirements.txt (line 21))
Requirement already satisfied (use --upgrade to upgrade): requests==2.0.0 in /Users/tf/anaconda/envs/Pants/lib/python2.7/site-packages (from -r /Users/tf/Desktop/GitStuff/pants/3rdparty/python/requirements.txt (line 22))
Requirement already satisfied (use --upgrade to upgrade): setuptools==2.2 in /Users/tf/anaconda/envs/Pants/lib/python2.7/site-packages (from -r /Users/tf/Desktop/GitStuff/pants/3rdparty/python/requirements.txt (line 23))
Requirement already satisfied (use --upgrade to upgrade): thrift==0.9.1 in /Users/tf/anaconda/envs/Pants/lib/python2.7/site-packages (from -r /Users/tf/Desktop/GitStuff/pants/3rdparty/python/requirements.txt (line 24))
Requirement already satisfied (use --upgrade to upgrade): py>=1.4.20 in /Users/tf/anaconda/envs/Pants/lib/python2.7/site-packages (from pytest==2.5.2->-r /Users/tf/Desktop/GitStuff/pants/3rdparty/python/requirements.txt (line 19))
Requirement already satisfied (use --upgrade to upgrade): cov-core>=1.6 in /Users/tf/anaconda/envs/Pants/lib/python2.7/site-packages (from pytest-cov==1.6->-r /Users/tf/Desktop/GitStuff/pants/3rdparty/python/requirements.txt (line 20))
Requirement already satisfied (use --upgrade to upgrade): lockfile>=0.7 in /Users/tf/anaconda/envs/Pants/lib/python2.7/site-packages (from python-daemon==1.5.5->-r /Users/tf/Desktop/GitStuff/pants/3rdparty/python/requirements.txt (line 21))
Cleaning up...
Requirement already satisfied (use --upgrade to upgrade): twitter.common.collections in /Users/tf/anaconda/envs/Pants/lib/python2.7/site-packages (from -r /Users/tf/Desktop/GitStuff/pants/3rdparty/python/twitter/commons/requirements.txt (line 6))
Requirement already satisfied (use --upgrade to upgrade): twitter.common.config in /Users/tf/anaconda/envs/Pants/lib/python2.7/site-packages (from -r /Users/tf/Desktop/GitStuff/pants/3rdparty/python/twitter/commons/requirements.txt (line 7))
Requirement already satisfied (use --upgrade to upgrade): twitter.common.confluence in /Users/tf/anaconda/envs/Pants/lib/python2.7/site-packages (from -r /Users/tf/Desktop/GitStuff/pants/3rdparty/python/twitter/commons/requirements.txt (line 8))
Requirement already satisfied (use --upgrade to upgrade): twitter.common.contextutil in /Users/tf/anaconda/envs/Pants/lib/python2.7/site-packages (from -r /Users/tf/Desktop/GitStuff/pants/3rdparty/python/twitter/commons/requirements.txt (line 9))
Requirement already satisfied (use --upgrade to upgrade): twitter.common.decorators in /Users/tf/anaconda/envs/Pants/lib/python2.7/site-packages (from -r /Users/tf/Desktop/GitStuff/pants/3rdparty/python/twitter/commons/requirements.txt (line 10))
Requirement already satisfied (use --upgrade to upgrade): twitter.common.dirutil in /Users/tf/anaconda/envs/Pants/lib/python2.7/site-packages (from -r /Users/tf/Desktop/GitStuff/pants/3rdparty/python/twitter/commons/requirements.txt (line 11))
Requirement already satisfied (use --upgrade to upgrade): twitter.common.lang in /Users/tf/anaconda/envs/Pants/lib/python2.7/site-packages (from -r /Users/tf/Desktop/GitStuff/pants/3rdparty/python/twitter/commons/requirements.txt (line 12))
Requirement already satisfied (use --upgrade to upgrade): twitter.common.log in /Users/tf/anaconda/envs/Pants/lib/python2.7/site-packages (from -r /Users/tf/Desktop/GitStuff/pants/3rdparty/python/twitter/commons/requirements.txt (line 13))
Requirement already satisfied (use --upgrade to upgrade): twitter.common.process in /Users/tf/anaconda/envs/Pants/lib/python2.7/site-packages (from -r /Users/tf/Desktop/GitStuff/pants/3rdparty/python/twitter/commons/requirements.txt (line 14))
Requirement already satisfied (use --upgrade to upgrade): twitter.common.python in /Users/tf/anaconda/envs/Pants/lib/python2.7/site-packages (from -r /Users/tf/Desktop/GitStuff/pants/3rdparty/python/twitter/commons/requirements.txt (line 15))
Requirement already satisfied (use --upgrade to upgrade): twitter.common.quantity in /Users/tf/anaconda/envs/Pants/lib/python2.7/site-packages (from -r /Users/tf/Desktop/GitStuff/pants/3rdparty/python/twitter/commons/requirements.txt (line 16))
Requirement already satisfied (use --upgrade to upgrade): twitter.common.rwbuf in /Users/tf/anaconda/envs/Pants/lib/python2.7/site-packages (from -r /Users/tf/Desktop/GitStuff/pants/3rdparty/python/twitter/commons/requirements.txt (line 17))
Requirement already satisfied (use --upgrade to upgrade): twitter.common.threading in /Users/tf/anaconda/envs/Pants/lib/python2.7/site-packages (from -r /Users/tf/Desktop/GitStuff/pants/3rdparty/python/twitter/commons/requirements.txt (line 18))
Requirement already satisfied (use --upgrade to upgrade): twitter.common.util in /Users/tf/anaconda/envs/Pants/lib/python2.7/site-packages (from -r /Users/tf/Desktop/GitStuff/pants/3rdparty/python/twitter/commons/requirements.txt (line 19))
Requirement already satisfied (use --upgrade to upgrade): twitter.common.options==0.1.3 in /Users/tf/anaconda/envs/Pants/lib/python2.7/site-packages (from twitter.common.log->-r /Users/tf/Desktop/GitStuff/pants/3rdparty/python/twitter/commons/requirements.txt (line 13))
Requirement already satisfied (use --upgrade to upgrade): twitter.common.string==0.1.3 in /Users/tf/anaconda/envs/Pants/lib/python2.7/site-packages (from twitter.common.process->-r /Users/tf/Desktop/GitStuff/pants/3rdparty/python/twitter/commons/requirements.txt (line 14))
Requirement already satisfied (use --upgrade to upgrade): setuptools>=1 in /Users/tf/anaconda/envs/Pants/lib/python2.7/site-packages (from twitter.common.python->-r /Users/tf/Desktop/GitStuff/pants/3rdparty/python/twitter/commons/requirements.txt (line 15))
Cleaning up...
Traceback (most recent call last):
  File "src/python/pants/bin/pants_exe.py", line 19, in <module>
    from pants.commands.register import register_commands
  File "/Users/tf/Desktop/GitStuff/pants/src/python/pants/commands/register.py", line 8, in <module>
    from pants.commands.goal import Goal
  File "/Users/tf/Desktop/GitStuff/pants/src/python/pants/commands/goal.py", line 36, in <module>
    from pants.engine.engine import Engine
ImportError: No module named engine
./pants: line 90: /Users/tf/Desktop/GitStuff/pants/pants.pex: No such file or directory
./pants: line 90: exec: /Users/tf/Desktop/GitStuff/pants/pants.pex: cannot execute: No such file or directory

Sorry, but I'm a beginner at git. How do I include the branch I am using (plus its tip sha)?

@msabramo
Copy link
Contributor

msabramo commented Apr 8, 2014

@TFGIT:

git branch
git log -n 1

@jsirois
Copy link
Contributor

jsirois commented Apr 8, 2014

Actually in this case your branch won't help much since the issue appears to be your python environment. These are the juicy lines from the output you supplied:

...
 File "/Users/tf/anaconda/envs/Pants/lib/python2.7/platform.py", line 1499, in python_implementation
    return _sys_version()[0]
  File "/Users/tf/anaconda/envs/Pants/lib/python2.7/platform.py", line 1464, in _sys_version
    repr(sys_version))
ValueError: failed to parse CPython sys.version: '2.7.5 (default, Aug 25 2013, 00:04:04) \n[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)]'
...

Unless you can run pants under a python whose standard library platform module can parse its own version [1] - we won't be able to make progress. You should be able to run the following on a good python environment:

$ python2.6 -c 'import platform; print(str(platform.python_implementation()))'
CPython

The key here is the build-support/virtualenv script which does:

...
if which python2.7 >/dev/null; then
  PY=`which python2.7`
elif which python2.6 >/dev/null; then
  PY=`which python2.6`
else
  echo 'No python interpreter found on the path.  Python will not work!' 1>&2
  exit 1
fi

echo "Using $PY" >&2
...

If you have another python you can try on your system, you might edit that script to look like so:

...
if [[ -z "${PY}" ]]; then
  if which python2.7 >/dev/null; then
    PY=`which python2.7`
  elif which python2.6 >/dev/null; then
    PY=`which python2.6`
  else
    echo 'No python interpreter found on the path.  Python will not work!' 1>&2
    exit 1
  fi
fi

echo "Using $PY" >&2
...

Then call pants as such:

$ git clean -fdx && ./build-support/python/clean.sh && PY=/path/to/my/other/bin/python ./pants

[1] https://docs.python.org/2/library/platform.html

@jsirois
Copy link
Contributor

jsirois commented Apr 8, 2014

I did find several reported issues of this ilk against the Anaconda distribution: https://github.com/ContinuumIO/anaconda-issues/search?q=_sys_version&type=Issues

Some are marked fixed, so you might verify you have versions with those fixes in place.

@jsirois
Copy link
Contributor

jsirois commented Apr 8, 2014

Actually - the Anaconda fixes were of the ilk - make sure you don;t have your environment set up like so - perhaps check the advice out and see if you comply.

@tcfuji
Copy link
Author

tcfuji commented Apr 8, 2014

Using a virtual environment using Python 2.6, the pants.pex file was created. However, I did a sanity check and got this:

$ ./pants goal test tests/java/com/pants/examples/pingpong/BUILD:pingpong

20:22:32 00:00 [main]
               (To run a reporting server: ./pants server)
20:22:32 00:00   [setup]
20:22:32 00:00     [bootstrap]
20:22:32 00:00     [parse]
20:22:32 00:00   [bootstrap]
20:22:32 00:00     [bootstrap-jvm-tools]
20:22:32 00:00   [gen]
20:22:32 00:00     [thrift]
20:22:32 00:00     [scrooge]
20:22:32 00:00     [protoc]
20:22:32 00:00     [antlr]
20:22:32 00:00   [check-exclusives]
20:22:32 00:00     [check-exclusives]
20:22:32 00:00   [resolve]
  2% :32 00:00     [ivy]
               FAILURE
Traceback (most recent call last):
  File "/Users/tf/anaconda/envs/pants26/lib/python2.6/runpy.py", line 122, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/Users/tf/anaconda/envs/pants26/lib/python2.6/runpy.py", line 34, in _run_code
    exec code in run_globals
  File "/Users/tf/Desktop/GitStuff/pants/pants.pex/__main__.py", line 24, in <module>
  File "/Users/tf/Desktop/GitStuff/pants/pants.pex/.bootstrap/_twitter_common_python/pex_bootstrapper.py", line 65, in bootstrap_pex
  File "/Users/tf/Desktop/GitStuff/pants/pants.pex/.bootstrap/_twitter_common_python/pex.py", line 201, in execute
  File "/Users/tf/Desktop/GitStuff/pants/pants.pex/.bootstrap/_twitter_common_python/pex.py", line 237, in execute_entry
  File "/Users/tf/Desktop/GitStuff/pants/pants.pex/.bootstrap/_twitter_common_python/pex.py", line 260, in execute_pkg_resources
  File "/Users/tf/Desktop/GitStuff/pants/pants.pex/pants/bin/pants_exe.py", line 182, in main
  File "/Users/tf/Desktop/GitStuff/pants/pants.pex/pants/bin/pants_exe.py", line 165, in _run
  File "/Users/tf/Desktop/GitStuff/pants/pants.pex/pants/commands/goal.py", line 473, in run
  File "/Users/tf/Desktop/GitStuff/pants/pants.pex/pants/commands/goal.py", line 255, in _execute
  File "/Users/tf/Desktop/GitStuff/pants/pants.pex/pants/engine/engine.py", line 182, in execute
  File "/Users/tf/Desktop/GitStuff/pants/pants.pex/pants/engine/group_engine.py", line 281, in attempt
  File "/Users/tf/Desktop/GitStuff/pants/pants.pex/pants/engine/group_engine.py", line 172, in attempt
  File "/Users/tf/Desktop/GitStuff/pants/pants.pex/pants/engine/group_engine.py", line 143, in execute_task
  File "/Users/tf/Desktop/GitStuff/pants/pants.pex/pants/tasks/ivy_resolve.py", line 93, in execute
  File "/Users/tf/Desktop/GitStuff/pants/pants.pex/pants/tasks/nailgun_task.py", line 69, in create_java_executor
  File "/Users/tf/Desktop/GitStuff/pants/pants.pex/pants/tasks/jvm_tool_bootstrapper.py", line 19, in get_jvm_tool_classpath
  File "/Users/tf/Desktop/GitStuff/pants/pants.pex/pants/tasks/jvm_tool_bootstrapper.py", line 30, in <lambda>
  File "/Users/tf/Desktop/GitStuff/pants/pants.pex/pants/tasks/bootstrap_jvm_tools.py", line 68, in bootstrap_classpath
  File "/Users/tf/Desktop/GitStuff/pants/pants.pex/pants/tasks/task.py", line 341, in ivy_resolve
  File "/Users/tf/Desktop/GitStuff/pants/pants.pex/pants/ivy/bootstrapper.py", line 76, in default_ivy
  File "/Users/tf/Desktop/GitStuff/pants/pants.pex/pants/ivy/bootstrapper.py", line 95, in ivy
  File "/Users/tf/Desktop/GitStuff/pants/pants.pex/pants/ivy/bootstrapper.py", line 106, in _get_classpath
  File "/Users/tf/Desktop/GitStuff/pants/pants.pex/pants/ivy/bootstrapper.py", line 145, in _bootstrap_ivy_classpath
  File "/Users/tf/Desktop/GitStuff/pants/pants.pex/pants/ivy/bootstrapper.py", line 180, in _bootstrap_ivy
  File "/Users/tf/Desktop/GitStuff/pants/pants.pex/pants/net/http/fetcher.py", line 280, in download
  File "/Users/tf/Desktop/GitStuff/pants/pants.pex/pants/net/http/fetcher.py", line 244, in fetch
  File "/Users/tf/Desktop/GitStuff/pants/pants.pex/pants/net/http/fetcher.py", line 88, in recv_chunk
  File "/Users/tf/Desktop/GitStuff/pants/pants.pex/pants/net/http/fetcher.py", line 89, in recv_chunk
  File "/Users/tf/Desktop/GitStuff/pants/pants.pex/pants/net/http/fetcher.py", line 190, in recv_chunk
TypeError: can't multiply sequence by non-int of type 'float'

@jsirois
Copy link
Contributor

jsirois commented Apr 8, 2014

Excellent. That issue was fixed here: 398c4dd and reviewed here: #22 https://rbcommons.com/s/twitter/r/180/

@tcfuji
Copy link
Author

tcfuji commented Apr 8, 2014

Cloned the latest version. Executed ./pants goal test tests/java/com/pants/examples/pingpong/BUILD:pingpong and got this:

[SUCCESSFUL ] com.google.testing#test-libraries-for-java;1.1.1!test-libraries-for-java.jar (393ms)
                       :: resolution report :: resolve 96095ms :: artifacts dl 151544ms
                        :: evicted modules:
                        com.google.code.findbugs#jsr305;1.3.9 by [com.google.code.findbugs#jsr305;2.0.1] in [default]
                        com.twitter.common#base;0.0.84 by [com.twitter.common#base;0.0.85] in [default]
                        com.twitter.common#collections;0.0.71 by [com.twitter.common#collections;0.0.72] in [default]
                        com.twitter.common#quantity;0.0.68 by [com.twitter.common#quantity;0.0.69] in [default]
                        com.twitter.common#util-system-mocks;0.0.69 by [com.twitter.common#util-system-mocks;0.0.70] in [default]
                        com.google.guava#guava;15.0 by [com.google.guava#guava;16.0] in [default]
                        junit#junit-dep;4.10 by [junit#junit-dep;4.11] in [default]
                        org.hamcrest#hamcrest-core;1.2 by [org.hamcrest#hamcrest-core;1.3] in [default]
                        ---------------------------------------------------------------------
                        |                  |            modules            ||   artifacts   |
                        |       conf       | number| search|dwnlded|evicted|| number|dwnlded|
                        ---------------------------------------------------------------------
                        |      default     |   36  |   32  |   32  |   8   ||   27  |   26  |
                        ---------------------------------------------------------------------

                       :: problems summary ::
                       :::: WARNINGS
                            [FAILED     ] com.twitter.common#util-system-mocks;0.0.70!util-system-mocks.jar: Downloaded file size doesn't match expected Content Length for http://maven.twttr.com/com/twitter/common/util-system-mocks/0.0.70/util-system-mocks-0.0.70.jar. Please retry. (120341ms)

                            [FAILED     ] com.twitter.common#util-system-mocks;0.0.70!util-system-mocks.jar: Downloaded file size doesn't match expected Content Length for http://maven.twttr.com/com/twitter/common/util-system-mocks/0.0.70/util-system-mocks-0.0.70.jar. Please retry. (120341ms)

                        ==== remote-repos-maven.twttr.com-maven: tried

                          http://maven.twttr.com/com/twitter/common/util-system-mocks/0.0.70/util-system-mocks-0.0.70.jar

                            ::::::::::::::::::::::::::::::::::::::::::::::

                            ::              FAILED DOWNLOADS            ::

                            :: ^ see resolution messages for details  ^ ::

                            ::::::::::::::::::::::::::::::::::::::::::::::

                            :: com.twitter.common#util-system-mocks;0.0.70!util-system-mocks.jar

                            ::::::::::::::::::::::::::::::::::::::::::::::

                       :: USE VERBOSE OR DEBUG MESSAGE LEVEL FOR MORE DETAILS

FAILURE: Ivy returned 1


               FAILURE

@jsirois
Copy link
Contributor

jsirois commented Apr 8, 2014

That's just a normal ivy fetch failure. Retrying should be enough.

@tcfuji
Copy link
Author

tcfuji commented Apr 8, 2014

Retried:

21:54:43 01:11     [specs]
               Waiting for background workers to finish.
               SUCCESS

Thanks!
In the future, is it best to use the git clean -fdx && ./build-support/python/clean.sh && PY=/path/to/my/other/bin/python ./pants instead of just ./pants to take care of the dependencies?

@jsirois
Copy link
Contributor

jsirois commented Apr 8, 2014

Well, the pants dependencies setup should be robust to failure, this was the only reason the clean steps were needed - filed #33 to track fixing that. Pretend those fixes were in - you'd still be in trouble with the Anaconda distribution and you'd need to use the PY= to bootstrap pants (but not thereafter). Filed #34 to track allowing PY to be set. If you want to post your diff for that - that would be great. See http://pantsbuild.github.io/howto_contribute.html

@jsirois jsirois closed this as completed Apr 8, 2014
wickman added a commit that referenced this issue Dec 4, 2014
SSIA.  The user facing parts of this change:
  - package resolution happens via requests now -- this is way more reliable
    and results in fewer Untranslateable exceptions
  - PEX_VERBOSE now controls all pex verbosity, including better messages around Untranslateable (yay!)
  - fixes a major pex regression with namespace packages introduced somewhere in 0.5.x

The pex 0.7.0 -> 0.8.0 changelog:

* *API change*: Decouple translation from package iteration.  This removes
  the Obtainer construct entirely, which likely means if you're using PEX as
  a library, you will need to change your code if you were doing anything
  nontrivial.  This adds a couple new options to ``resolve`` but simplifies
  the story around how to cache packages.
  [RB #785](https://rbcommons.com/s/twitter/r/785/)
* Refactor http handling in pex to allow for alternate http implementations.  Adds support
  for [requests](https://github.com/kennethreitz/requests),
  improving both performance and security.   For more information, read the commit notes at
  [91c7f32](pex-tool/pex@91c7f32).
  [RB #778](https://rbcommons.com/s/twitter/r/778/)
* Improvements to API documentation throughout.
* Renamed ``Tracer`` to ``TraceLogger`` to prevent nondeterministic isort ordering.
* Refactor tox.ini to increase the number of environment combinations and improve coverage.
* Adds HTTP retry support for the RequestsContext.
  [RB #1303](https://rbcommons.com/s/twitter/r/1303/)
* Make pex --version correct.
  [Issue #19](pex-tool/pex#19)
* Bug fix: Fix over-aggressive sys.modules scrubbing for namespace packages.  Under
  certain circumstances, namespace packages in site-packages could conflict with packages
  within a PEX, causing them to fail importing.
  [RB #1378](https://rbcommons.com/s/twitter/r/1378/)
* Bug fix: Replace uses of ``os.unsetenv(...)`` with ``del os.environ[...]``
  [Pull Request #11](pex-tool/pex#11)
* Bug fix: Scrub sys.path and sys.modules based upon both supplied path and
  realpath of files and directories.  Newer versions of virtualenv on Linux symlink site-packages
  which caused those packages to not be removed from sys.path correctly.
  [Issue #21](pex-tool/pex#21)
* Bug fix: The pex -s option was not correctly pulling in transitive dependencies.
  [Issue #22](pex-tool/pex#22)
* Bug fix: Adds ``content`` method to HTTP contexts that does HTML content decoding, fixing
  an encoding issue only experienced when using Python 3.
  [Issue #10](pex-tool/pex#10)

Testing Done:
build-support/bin/ci.sh

Reviewed at https://rbcommons.com/s/twitter/r/1421/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants