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

Initialize environment with python version that's not reachable to pyenv raises exception #3117

Closed
xcdr opened this issue Oct 28, 2018 · 1 comment

Comments

@xcdr
Copy link

xcdr commented Oct 28, 2018

Issue description

Initialize environment with python version that's not reachable to pyenv raises exception.

pipenv: 2018.10.13
pyenv: current
python: 3.6.5

Expected result

Simple error message.

Actual result

pipenv --python 3.7.1
Warning: Python 3.7.1 was not found on your system…
Would you like us to install CPython 3.7.1 with pyenv? [Y/n]: y
Installing CPython 3.7.1 with pyenv (this may take a few minutes)…
Traceback (most recent call last):
  File "/home/xcdr/.pyenv/versions/3.6.5/bin/pipenv", line 11, in <module>
    sys.exit(cli())
  File "/home/xcdr/.pyenv/versions/3.6.5/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/xcdr/.pyenv/versions/3.6.5/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/xcdr/.pyenv/versions/3.6.5/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1114, in invoke
    return Command.invoke(self, ctx)
  File "/home/xcdr/.pyenv/versions/3.6.5/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/xcdr/.pyenv/versions/3.6.5/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/xcdr/.pyenv/versions/3.6.5/lib/python3.6/site-packages/pipenv/vendor/click/decorators.py", line 64, in new_func
    return ctx.invoke(f, obj, *args, **kwargs)
  File "/home/xcdr/.pyenv/versions/3.6.5/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/xcdr/.pyenv/versions/3.6.5/lib/python3.6/site-packages/pipenv/vendor/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/xcdr/.pyenv/versions/3.6.5/lib/python3.6/site-packages/pipenv/cli/command.py", line 203, in cli
    clear=state.clear,
  File "/home/xcdr/.pyenv/versions/3.6.5/lib/python3.6/site-packages/pipenv/core.py", line 565, in ensure_project
    pypi_mirror=pypi_mirror,
  File "/home/xcdr/.pyenv/versions/3.6.5/lib/python3.6/site-packages/pipenv/core.py", line 488, in ensure_virtualenv
    python = ensure_python(three=three, python=python)
  File "/home/xcdr/.pyenv/versions/3.6.5/lib/python3.6/site-packages/pipenv/core.py", line 451, in ensure_python
    c = pyenv.install(version)
  File "/home/xcdr/.pyenv/versions/3.6.5/lib/python3.6/site-packages/pipenv/pyenv.py", line 117, in install
    timeout=PIPENV_INSTALL_TIMEOUT,
  File "/home/xcdr/.pyenv/versions/3.6.5/lib/python3.6/site-packages/pipenv/pyenv.py", line 73, in _pyenv
    raise PyenvError('faild to run {0}'.format(args), c)
  File "/home/xcdr/.pyenv/versions/3.6.5/lib/python3.6/site-packages/pipenv/pyenv.py", line 56, in __init__
    self.err = c.err
  File "/home/xcdr/.pyenv/versions/3.6.5/lib/python3.6/site-packages/pipenv/vendor/delegator.py", line 146, in err
    return self._pexpect_out
  File "/home/xcdr/.pyenv/versions/3.6.5/lib/python3.6/site-packages/pipenv/vendor/delegator.py", line 114, in _pexpect_out
    result += self.subprocess.after
TypeError: must be str, not type

Steps to replicate

Ensure that version doesn't exists pyenv install --list|grep 3.7.2
Try initialize environment: pipenv --python 3.7.2

@techalchemy
Copy link
Member

duplicate of #3102 -- closing to track there

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants