New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 760727 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Check if virtualenv is installed or make error clearer when it is not

Project Member Reported by ayatane@chromium.org, Aug 30 2017

Issue description

https://bugs.chromium.org/p/chromium/issues/detail?id=760373

Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/local/google/home/armax/Dev/lab_tools/infra_virtualenv/venv/cros_venv/scripts/create_venv.py", line 46, in <module>
    main()
  File "/usr/local/google/home/armax/Dev/lab_tools/infra_virtualenv/venv/cros_venv/scripts/create_venv.py", line 35, in main
    print(venv.ensure())
  File "/usr/local/google/home/armax/Dev/lab_tools/infra_virtualenv/venv/cros_venv/venvlib.py", line 174, in ensure
    self._check_or_create()
  File "/usr/local/google/home/armax/Dev/lab_tools/infra_virtualenv/venv/cros_venv/venvlib.py", line 182, in _check_or_create
    self._create()
  File "/usr/local/google/home/armax/Dev/lab_tools/infra_virtualenv/venv/cros_venv/venvlib.py", line 191, in _create
    logfile=logfile)
  File "/usr/local/google/home/armax/Dev/lab_tools/infra_virtualenv/venv/cros_venv/venvlib.py", line 282, in _create_venv
    _log_check_call(command, logfile=logfile)
  File "/usr/local/google/home/armax/Dev/lab_tools/infra_virtualenv/venv/cros_venv/venvlib.py", line 304, in wrapped_command
    call_func(args, stdout=logfile, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 535, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 522, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
ERROR: Failed to set up a virtualenv.

This isn't very clear, but it's because virtualenv is not installed.
 
Cc: jkop@chromium.org
 Issue 762122  has been merged into this issue.
I should note that while installing python-virtualenv appears to fix this issue, there's now a new directory in my repo:

src/third_party/autotest/files/venv

Can we either remove/fix it or update .gitignore to ignore it?
Cc: kenobi@chromium.org
That directory contains code.  It's committed to Git.
Owner: ayatane@chromium.org
Status: Started (was: Untriaged)
Labels: -Restrict-View-Google OS-Chrome
This is in public code, and it can break external developers. I don't see why Restrict-View-Google is required.
Project Member

Comment 7 by bugdroid1@chromium.org, Sep 30 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/infra_virtualenv/+/78b9ff6eae8c5fd22210cc2f99ee34e711495afb

commit 78b9ff6eae8c5fd22210cc2f99ee34e711495afb
Author: Allen Li <ayatane@google.com>
Date: Sat Sep 30 03:16:26 2017

Make virtualenv missing error message clearer

BUG= chromium:760727 
TEST=bin/run_tests

Change-Id: Icd58e7bd38e786d35546f97f404a2c2f55084bff
Reviewed-on: https://chromium-review.googlesource.com/692982
Commit-Ready: Allen Li <ayatane@chromium.org>
Tested-by: Allen Li <ayatane@chromium.org>
Reviewed-by: Jacob Kopczynski <jkop@chromium.org>

[modify] https://crrev.com/78b9ff6eae8c5fd22210cc2f99ee34e711495afb/venv/cros_venv/venvlib.py
[modify] https://crrev.com/78b9ff6eae8c5fd22210cc2f99ee34e711495afb/venv/cros_venv/test_venvlib.py

Status: Fixed (was: Started)

Comment 9 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Comment 10 by dchan@chromium.org, Jan 23 2018

Status: Fixed (was: Archived)

Sign in to add a comment