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

Warning message abbreviates path string; warning is less useful #3521

Closed
jtmoon79 opened this issue Feb 10, 2019 · 1 comment
Closed

Warning message abbreviates path string; warning is less useful #3521

jtmoon79 opened this issue Feb 10, 2019 · 1 comment

Comments

@jtmoon79
Copy link

jtmoon79 commented Feb 10, 2019

tl;dr pipenv emitted a warning but shortened the path to the particular virtual environment it was referring (C:\Users\user1\.\J\S\python.exe). It was difficult to act on the warning because I am not certain which virtual environment (among many I have setup) or which python install (several are installed) this refers (I initially thought pipenv mixed up paths).

Issue description

I have setup five pipenv virtual environments for projects I am hacking at. Also is installed Pythons 3.4, 3.5, 3.6, 3.7.

When I setup another pipenv virtual environment, pipenv warned me about a possible problem.

Virtualenv location: C:\Users\user1\.virtualenvs\Project1-u18NbQNd
Warning: Your Pipfile requires python_version 3.7, but you are using 3.5.4 (C:\Users\user1\.\J\S\python.exe).
  $ pipenv --rm and rebuilding the virtual environment may resolve the issue.
  $ pipenv check will surely fail.

I cannot determine which project virtual environment the shortened path "C:\Users\user1\.\J\S\python.exe" refers. And I'm not certain if that path is simply the same as the preceding sentence path "C:\Users\user1\.virtualenvs\Project1-u18NbQNd" (I would guess it is, but I'd prefer to be certain). (it turns out the python_version within Pipfile was wrong)

Since I have several Python installs (3.4, 3.5, 3.6, 3.7) and several pipenv virtual environments, I was concerned pipenv was using the wrong pathed Python environment.

Recommended Fix

Print the entire path within the warning message.

@jtmoon79 jtmoon79 changed the title Warning message shortens path string too much; warning is far less useful Warning message shortens path string too much; warning is less useful Feb 11, 2019
@jtmoon79 jtmoon79 changed the title Warning message shortens path string too much; warning is less useful Warning message shortens abbreviates path string; warning is less useful Feb 11, 2019
@jtmoon79 jtmoon79 changed the title Warning message shortens abbreviates path string; warning is less useful Warning message abbreviates path string; warning is less useful Feb 11, 2019
@techalchemy
Copy link
Member

Hey, thanks for the report and sorry for the issue -- it can only possibly refer to the one you are working on (pipenv --venv etc)

I do see why the shortened path might be confusing, but it also provides consistency for the UX especially for terminal users. In any event this is definitely low priority so I think for now we can close this out and revisit in the future if it continues to cause confusion

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