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

cannot get working directory leads to pip fail #321

Closed
sethwoodworth opened this Issue Jul 16, 2011 · 3 comments

Comments

Projects
None yet
3 participants
@sethwoodworth
Contributor

sethwoodworth commented Jul 16, 2011

pip fails without a clear error message if pwd == a deleted directory.

mkdir /tmp/tmp
cd /tmp/tmp
rm -rf /tmp/tmp  # from another term
pip search

fails and provides this message:

sudo: cannot get working directory
Traceback (most recent call last):
  File "/usr/bin/pip", line 9, in <module>
    load_entry_point('pip==0.8.2', 'console_scripts', 'pip')()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 305, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2244, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1954, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
  File "/usr/lib/pymodules/python2.7/pip/__init__.py", line 10, in <module>
    from pip.basecommand import command_dict, load_command, load_all_commands, command_names
  File "/usr/lib/pymodules/python2.7/pip/basecommand.py", line 15, in <module>
    from pip.baseparser import parser, ConfigOptionParser, UpdatingDefaultsHelpFormatter
  File "/usr/lib/pymodules/python2.7/pip/baseparser.py", line 9, in <module>
    from pip.locations import default_config_file, default_log_file
  File "/usr/lib/pymodules/python2.7/pip/locations.py", line 22, in <module>
    build_prefix = os.path.join(os.getcwd(), 'build')
OSError: [Errno 2] No such file or directory`
@jezdez

This comment has been minimized.

Show comment
Hide comment
@jezdez

jezdez Jul 19, 2011

Contributor

Seems like a good idea to handle the OSError.

Contributor

jezdez commented Jul 19, 2011

Seems like a good idea to handle the OSError.

sethwoodworth added a commit to sethwoodworth/pip that referenced this issue Oct 18, 2011

@sethwoodworth

This comment has been minimized.

Show comment
Hide comment
@sethwoodworth

sethwoodworth Oct 18, 2011

Contributor

Solution offered in pull request: #372

Contributor

sethwoodworth commented Oct 18, 2011

Solution offered in pull request: #372

pnasrat added a commit that referenced this issue May 13, 2012

Merge pull request #372 from sethwoodworth/develop
issue #321: provides except block for when current working directory fail
@qwcode

This comment has been minimized.

Show comment
Hide comment
@qwcode

qwcode Dec 6, 2012

Contributor

fixed/merged with pull #372

Contributor

qwcode commented Dec 6, 2012

fixed/merged with pull #372

@qwcode qwcode closed this Dec 6, 2012

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