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

AttributeError: 'bool' object has no attribute 'startswith' #2855

Closed
ionelmc opened this issue Jun 2, 2015 · 8 comments
Closed

AttributeError: 'bool' object has no attribute 'startswith' #2855

ionelmc opened this issue Jun 2, 2015 · 8 comments
Labels
auto-locked Outdated issues that have been locked by automation

Comments

@ionelmc
Copy link
Contributor

ionelmc commented Jun 2, 2015

pip wheel pip setuptools wheel virtualenv --find-links=file:///home/ionel/stuff --no-cache-dir --wheel-dir=. --isolated

Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 223, in main
    status = self.run(options, args)
  File "/usr/local/lib/python2.7/dist-packages/pip/commands/wheel.py", line 162, in run
    wheel_cache = WheelCache(options.cache_dir, options.format_control)
  File "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 58, in __init__
    self._cache_dir = os.path.expanduser(cache_dir)
  File "/usr/lib/python2.7/posixpath.py", line 252, in expanduser
    if not path.startswith('~'):
AttributeError: 'bool' object has no attribute 'startswith'

Versions:

pip --version
pip 7.0.2 from /usr/local/lib/python2.7/dist-packages (python 2.7)
@ionelmc
Copy link
Contributor Author

ionelmc commented Jun 2, 2015

If I remove --no-cache-dir it works fine.

@dstufft
Copy link
Member

dstufft commented Jun 2, 2015

Can you verify #2856 fixes it for you.

@rhcarvalho
Copy link

Seems that this is still broken if using env var:

$ PIP_NO_CACHE_DIR=1 pip install gunicorn
Exception:
Traceback (most recent call last):
  File "/usr/lib/python3.3/site-packages/pip-7.0.3-py3.3.egg/pip/basecommand.py", line 223, in main
    status = self.run(options, args)
  File "/usr/lib/python3.3/site-packages/pip-7.0.3-py3.3.egg/pip/commands/install.py", line 242, in run
    with self._build_session(options) as session:
  File "/usr/lib/python3.3/site-packages/pip-7.0.3-py3.3.egg/pip/basecommand.py", line 71, in _build_session
    if options.cache_dir else None
  File "/usr/lib64/python3.3/posixpath.py", line 82, in join
    elif not path or path.endswith(sep):
AttributeError: 'int' object has no attribute 'endswith'

@ionelmc
Copy link
Contributor Author

ionelmc commented Jun 11, 2015

@rhcarvalho You should log a new issue (not sure if anyone sees your comment).

@jakirkham
Copy link
Contributor

Am running into this issue verbatim. Using Python 2.7 and pip 18.0. Here's the log.

@pradyunsg
Copy link
Member

@jakirkham It is not the same error verbatim.

It's been fixed in #5764 and would be released sometime next month.

@jakirkham
Copy link
Contributor

Hmm...maybe I missed something. Happy to trust your judgment. 🙂

@lock
Copy link

lock bot commented Jun 1, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 1, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

No branches or pull requests

5 participants