You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If call_subprocess in utils/__init__.py is called with show_stdout=True, and the subprocess fails, pip errors out with UnboundLocalError: local variable 'all_output' referenced before assignment.
To avoid this, it should not try to print all_output when called when show_stdout=True. In this case, the process's stdout will already be printed to the console.
Discovered using this command:
$ pip install git+ssh://git@github.com:uber/vertica-python.git@0.2.1
Collecting git+ssh://git@github.com:uber/vertica-python.git@0.2.1
Cloning ssh://git@github.com:uber/vertica-python.git (to 0.2.1) to /tmp/pip-8k63_T-build
ssh: Could not resolve hostname github.com:uber: Name or service not known
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
git clone -q ssh://git@github.com:uber/vertica-python.git /tmp/pip-8k63_T-build
Complete output from command git clone -q ssh://git@github.com:uber/vertica-python.git /tmp/pip-8k63_T-build:
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 209, in main
status = self.run(options, args)
File "/usr/lib/python2.7/site-packages/pip/commands/install.py", line 299, in run
requirement_set.prepare_files(finder)
File "/usr/lib/python2.7/site-packages/pip/req/req_set.py", line 359, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/lib/python2.7/site-packages/pip/req/req_set.py", line 576, in _prepare_file
session=self.session, hashes=hashes)
File "/usr/lib/python2.7/site-packages/pip/download.py", line 793, in unpack_url
unpack_vcs_link(link, location)
File "/usr/lib/python2.7/site-packages/pip/download.py", line 474, in unpack_vcs_link
vcs_backend.unpack(location)
File "/usr/lib/python2.7/site-packages/pip/vcs/__init__.py", line 283, in unpack
self.obtain(location)
File "/usr/lib/python2.7/site-packages/pip/vcs/git.py", line 124, in obtain
self.run_command(['clone', '-q', url, dest])
File "/usr/lib/python2.7/site-packages/pip/vcs/__init__.py", line 322, in run_command
spinner)
File "/usr/lib/python2.7/site-packages/pip/utils/__init__.py", line 712, in call_subprocess
''.join(all_output) +
UnboundLocalError: local variable 'all_output' referenced before assignment
The text was updated successfully, but these errors were encountered:
If
call_subprocess
inutils/__init__.py
is called withshow_stdout=True
, and the subprocess fails, pip errors out withUnboundLocalError: local variable 'all_output' referenced before assignment
.To avoid this, it should not try to print
all_output
when called whenshow_stdout=True
. In this case, the process's stdout will already be printed to the console.Discovered using this command:
The text was updated successfully, but these errors were encountered: