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

`find_command` should not raise AttributeError #274

hltbra opened this Issue Apr 28, 2011 · 0 comments


None yet
1 participant

hltbra commented Apr 28, 2011

If there is no PATH environment variable defined, and pip needs to use pip.util.find_command, it crashes. The problem is at line pip/

paths = os.environ.get('PATH', []).split(os.pathsep)

Showing failure:

$ unset PATH
$ ~/.virtualenvs/NOPATH/bin/pip install git+
Downloading/unpacking git+
  Cloning to /var/folders/dJ/dJV4L+tBHli9B7OhUAvPBE+++TQ/-Tmp-/pip-94pfXx-build
Traceback (most recent call last):
  File "/Users/hugo/.virtualenvs/NOPATH/lib/python2.6/site-packages/pip/", line 126, in main, args)
  File "/Users/hugo/.virtualenvs/NOPATH/lib/python2.6/site-packages/pip/commands/", line 223, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/Users/hugo/.virtualenvs/NOPATH/lib/python2.6/site-packages/pip/", line 955, in prepare_files
    self.unpack_url(url, location, self.is_download)
  File "/Users/hugo/.virtualenvs/NOPATH/lib/python2.6/site-packages/pip/", line 1066, in unpack_url
    return unpack_vcs_link(link, location, only_download)
  File "/Users/hugo/.virtualenvs/NOPATH/lib/python2.6/site-packages/pip/", line 292, in unpack_vcs_link
  File "/Users/hugo/.virtualenvs/NOPATH/lib/python2.6/site-packages/pip/vcs/", line 228, in unpack
  File "/Users/hugo/.virtualenvs/NOPATH/lib/python2.6/site-packages/pip/vcs/", line 107, in obtain
    call_subprocess([self.cmd, 'clone', '-q', url, dest])
  File "/Users/hugo/.virtualenvs/NOPATH/lib/python2.6/site-packages/pip/vcs/", line 108, in cmd
    command = find_command(
  File "/Users/hugo/.virtualenvs/NOPATH/lib/python2.6/site-packages/pip/", line 74, in find_command
    paths = os.environ.get('PATH', []).split(os.pathsep)
AttributeError: 'list' object has no attribute 'split'

Storing complete log in /Users/hugo/.pip/pip.log

hltbra added a commit that referenced this issue Apr 28, 2011

@hltbra hltbra closed this Apr 28, 2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment