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

pipenv failed in virtualenv #2957

Closed
craynic opened this issue Oct 9, 2018 · 1 comment
Closed

pipenv failed in virtualenv #2957

craynic opened this issue Oct 9, 2018 · 1 comment
Labels
Type: Bug 🐛 This issue is a bug.

Comments

@craynic
Copy link
Contributor

craynic commented Oct 9, 2018

pipenv, version 2018.10.9

(create a new virtualenv and install pipenv)
$ pipenv install ipython
Installing ipython…
(....something does not matter)
Adding ipython to Pipfile's [packages]…
Pipfile.lock (17b797) out of date, updating to (8fdd10)…
Locking [dev-packages] dependencies…
Traceback (most recent call last):
File "/home/craynic/.virtualenvs/test2/bin/pipenv", line 11, in
sys.exit(cli())
File "/home/craynic/.virtualenvs/test2/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 764, in call
return self.main(*args, **kwargs)
File "/home/craynic/.virtualenvs/test2/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/craynic/.virtualenvs/test2/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/craynic/.virtualenvs/test2/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/craynic/.virtualenvs/test2/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/craynic/.virtualenvs/test2/lib/python3.7/site-packages/pipenv/vendor/click/decorators.py", line 64, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
File "/home/craynic/.virtualenvs/test2/lib/python3.7/site-packages/pipenv/vendor/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/craynic/.virtualenvs/test2/lib/python3.7/site-packages/pipenv/vendor/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/home/craynic/.virtualenvs/test2/lib/python3.7/site-packages/pipenv/cli/command.py", line 249, in install
editable_packages=state.installstate.editables,
File "/home/craynic/.virtualenvs/test2/lib/python3.7/site-packages/pipenv/core.py", line 1950, in do_install
skip_lock=skip_lock,
File "/home/craynic/.virtualenvs/test2/lib/python3.7/site-packages/pipenv/core.py", line 1242, in do_init
pypi_mirror=pypi_mirror,
File "/home/craynic/.virtualenvs/test2/lib/python3.7/site-packages/pipenv/core.py", line 1034, in do_lock
pypi_mirror=pypi_mirror,
File "/home/craynic/.virtualenvs/test2/lib/python3.7/site-packages/pipenv/utils.py", line 355, in venv_resolve_deps
escape_grouped_arguments(which("python", allow_global=allow_global)),
File "/home/craynic/.virtualenvs/test2/lib/python3.7/site-packages/pipenv/core.py", line 109, in which
if not location and os.path.exists(location):
File "/home/craynic/.virtualenvs/test2/lib/python3.7/genericpath.py", line 19, in exists
os.stat(path)
TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType

@techalchemy techalchemy added the Type: Bug 🐛 This issue is a bug. label Oct 9, 2018
@techalchemy
Copy link
Member

Thanks for the report, the logic there is pretty straightforwardly flawed:

if not location and os.path.exists(location): can never actually evaluate without failing

sorry for that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug 🐛 This issue is a bug.
Projects
None yet
Development

No branches or pull requests

2 participants