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 · 7 comments

Comments

Projects
None yet
5 participants
@ionelmc
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

This comment has been minimized.

Show comment
Hide comment
@ionelmc

ionelmc Jun 2, 2015

Contributor

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

Contributor

ionelmc commented Jun 2, 2015

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

@dstufft

This comment has been minimized.

Show comment
Hide comment
@dstufft

dstufft Jun 2, 2015

Member

Can you verify #2856 fixes it for you.

Member

dstufft commented Jun 2, 2015

Can you verify #2856 fixes it for you.

@dstufft dstufft closed this in #2856 Jun 2, 2015

@rhcarvalho

This comment has been minimized.

Show comment
Hide comment
@rhcarvalho

rhcarvalho Jun 11, 2015

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'

rhcarvalho commented Jun 11, 2015

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

This comment has been minimized.

Show comment
Hide comment
@ionelmc

ionelmc Jun 11, 2015

Contributor

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

Contributor

ionelmc commented Jun 11, 2015

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

@jakirkham

This comment has been minimized.

Show comment
Hide comment
@jakirkham

jakirkham Sep 17, 2018

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

jakirkham commented Sep 17, 2018

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

@pradyunsg

This comment has been minimized.

Show comment
Hide comment
@pradyunsg

pradyunsg Sep 17, 2018

Member

@jakirkham It is not the same error verbatim.

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

Member

pradyunsg commented Sep 17, 2018

@jakirkham It is not the same error verbatim.

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

@jakirkham

This comment has been minimized.

Show comment
Hide comment
@jakirkham

jakirkham Sep 17, 2018

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

jakirkham commented Sep 17, 2018

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

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