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

UNC paths are not supported. Defaulting to Windows directory. #2295

Closed
ghost opened this issue Jun 2, 2018 · 31 comments
Closed

UNC paths are not supported. Defaulting to Windows directory. #2295

ghost opened this issue Jun 2, 2018 · 31 comments
Labels
good first issue Issues suitable as a newcomer to get familiar with Pipenv! OS: Windows This issue affects the Windows Operating System. Type: Enhancement 💡 This is a feature or enhancement request.

Comments

@ghost
Copy link

ghost commented Jun 2, 2018

Running pipenv shell from (Administrator) command prompt in Windows 10 Pro to launch virtual environment outputs:

UNC paths are not supported. Defaulting to Windows directory.

when run from within a mapped network drive.

The virtual environment does not show up in () before the drive. (If I am in the virtual environment at this point, it is easy to forget that I am and I could forget to exit out. Moreover, it doesn't show which environment I'm in).

If I type activate afterwards, the environment in () shows up, but I don't have to be in the folder where Pipfile or Pipfile.lock are located.

  1. Is this expected behavior?
  2. Is this somehow a holdover from virtualenv's or virtualenvwrapper's ability to utilize UNC paths?
@ghost
Copy link
Author

ghost commented Jun 2, 2018

Perhaps also related to using pipenv in a mapped network drive on Windows 10 is that I get the following error when running pipenv install (happens with all installs, but here is an example for sphinx):

pipenv_install_error_with_pipfile_writing

If I look at my Pipfile, you can see sphinx there, but not in Pipfile.lock.

pipfiles.zip

@ghost
Copy link
Author

ghost commented Jun 2, 2018

Any chance we could use python 3's pathlib module? PEP 428

@uranusjr
Copy link
Member

uranusjr commented Jun 3, 2018

Yup of course, many parts of Pipenv already uses pathlib now (falling back to pathlib2 for Python 2).

@ghost
Copy link
Author

ghost commented Jun 3, 2018

@uranusjr Any chance there is a fix for the UNC error?

@techalchemy
Copy link
Member

@ahendry2688 were you proposing to fix the problem or simply telling us about the pathlib module? also, if you would please attach logs as text, following the help instructions in the issue template, rather than screenshots and zipfiles, it would be much appreciated.

@ghost
Copy link
Author

ghost commented Jun 4, 2018

@techalchemy Proposing to fix using the UNC capability within pathlib. Don’t have time right now. Can you?

@uranusjr
Copy link
Member

uranusjr commented Jun 4, 2018

We’re in the middle of a new version release right now, so this will probably need to wait a while.

@adamhendry
Copy link

@uranusjr @techalchemy Okay, understandable of course. Let me create a pull request and see what I can do. And sorry about the format from before (I'll use text logs from now on)

@ghost
Copy link
Author

ghost commented Jun 5, 2018

@uranusjr @techalchemy I get error when running run-tests.bat. The system cannot find R:\ because it doesn't exist. Is there a reason you commented out the command to imdisk in the first line?

@techalchemy
Copy link
Member

That’s a CI script. imdisk is a ramdisk utility that doesn’t come with windows. Don’t use that for local testing unless you want to mess with ramdisk installs

@ghost
Copy link
Author

ghost commented Jun 6, 2018

@techalchemy Thank you. I'm just trying to run the tests because the Contributor's Guide says to:

2. Run the tests to confirm they all pass on your system.

Do I need to run run-tests.bat and run-tests.sh? Are there tests other than these that I need to run before I start writing my changes to the code?

@uranusjr
Copy link
Member

uranusjr commented Jun 6, 2018

No you only need to run pipenv run pytest tests in the project root. Optionally you can add -n flags to run them in parallel. You can consult the Pytest docs to learn more, but our docs could probably use some write up to make this clearer. (Contributions welcomes here too!)

@uranusjr uranusjr added Type: Enhancement 💡 This is a feature or enhancement request. OS: Windows This issue affects the Windows Operating System. good first issue Issues suitable as a newcomer to get familiar with Pipenv! labels Jun 6, 2018
@ghost
Copy link
Author

ghost commented Jun 8, 2018

@uranusjr Okay, thank you. Ya, let me write up some instructions as I go through the tests (I usually find I write better instructions that way).

@ghost
Copy link
Author

ghost commented Jun 8, 2018

pytests_output.txt

@uranusjr @techalchemy I got several errors, and one that it said to report to you (see attached).

@erinxocon
Copy link
Contributor

PR #2331 should fix this.

@ghost
Copy link
Author

ghost commented Jun 9, 2018

@uranusjr I don't see -n as a flag option in either the help (pytest --help) or the online docs. Would I run this as

pipenv run pytest tests -n 24

if, e.g., I had 24 (virtual) cores?

@techalchemy
Copy link
Member

no. The -n flag comes from pytest-xdist and you should pass either -n 4 or -n auto if you want to parallelize

@ghost
Copy link
Author

ghost commented Jun 9, 2018

@techalchemy Thanks Dan. I'm running tests on @erinxocon 's PR as we speak now.

@ghost
Copy link
Author

ghost commented Jun 9, 2018

@techalchemy I reran tests and am still getting error outputs. I forwarded results to @erinxocon in PR #2331.

(EDIT: I realized I'm running on a different machine. I should have run -n auto as you suggested. I only have 4 cores on this one. let me rerun.)

@ghost
Copy link
Author

ghost commented Jun 9, 2018

@techalchemy Corrected using -n auto and errors still remain. I posted new output in PR #2331.

@ghost
Copy link
Author

ghost commented Jun 9, 2018

@techalchemy If it helps, here is my output from running pytest --fixtures.

pytest_fixtures_output.txt

@techalchemy
Copy link
Member

look, we have tests that run on windows, if you need help running tests please use our appveyor config as a reference. Our tests run in CI, failures on your personal environment are not an indication about the code in pipenv and will not be helpful to the PR. Your environment is not configured correctly, but these issues and their respective fixes are meant for us to triage and respond to technical problems with our software. It would be greatly appreciated if you could direct your testing questions to another channel of communication, like stackoverflow, or create a separate issue if there is a problem with pipenv, so that we can continue to use these issues to discuss the problems in question.

For your reference:

set PYPI_VENDOR_DIR=".\tests\pypi\"
set PYTHONIOENCODING="utf-8"
python -m pip install --upgrade pip
python -m pip install -e .
python -m pipenv install --dev
python -m pipenv run pytest -v -n 4 --ignore=".\\pipenv\\patched" --ignore=".\\pipenv\\vendor" tests

@ghost
Copy link
Author

ghost commented Jun 9, 2018

@techalchemy If I have offended you in some way I did not mean to. I'm still a bit new to pytest and Github, so I apologize for all the comments. @erinxocon suggested a fix through her PR, and I was simply trying to confirm it. I'll be sure to leave my results there once I have "properly configured" my system.

With respect, "Your environment is not configured correctly" is vague as well and feels slightly accusatory and without basis, as you did not state what aspect of the error logs lead you to believe it was not configured correctly. I don't doubt you. I'm sure something is wrong with my system, but I would also appreciate if you would adhere to your own rules of "Be kind, or be on your way."

I will limit my comments in the future to only those affecting the software. I'm truly sorry for the trouble and thank you for your time.

@techalchemy
Copy link
Member

I'm not offended, however we are volunteers and while I get that you want to run our test suite, our test suite obviously doesn't catch this problem or it would have failed before you reported it.

A better investment of your time would be trying the thing that previously didn't work and seeing if it works now, and then confirming it, rather than attempting to fully integrate yourself into our development workflow. And while I am fully familiar with our 'rules' about being kind, it also includes being aware of the demands you are placing on the time of others. We triage dozens of issues a day most days, and nobody is doing it on paid time. Every 30 minutes I spend explaining how to use pytest is 30 minutes I didn't spend cutting a pipenv release, and therefore 30 less minutes I can spend with my partner or having leisure time.

So I'm not making accusations anymore than you reporting a bug in our software is an accusation. I also provided an example, of how we run them, in case you missed anything relevant. Beyond telling you how it works on the dozens of machines we've set this up on, any help is going to require us to basically google it for you, which is not a good use of our time. That's also the reason my comment was vague, since the test failures had nothing to do with pipenv. I don't think something is wrong with your system per se, but this stuff is kind of complex and layered so I really have no idea.

I realize that this all probably doesn't matter to you as an end user, but that's why I'm explaining it. I'm not out to offend you, more to push you to find help on non-pipenv errors somewhere else if you continue to have them to avoid this becoming a troubleshooting forum. Put yourself in our shoes for a second-- you would want the same thing

@ghost
Copy link
Author

ghost commented Jun 9, 2018

@techalchemy This affects my time too. I want to be a contributor, not just be an end user. What previously didn't work was pipenv as a whole. The Piplock file does not get updated with any pipenv install commands when it's issued from a network drive.

I thought I was helping you and I thought you wanted contributers. Do you not want my text files? Then why does the error message say to inform you of the error?

If you're a volunteer, then by definition you don't have to spend any time that you don't have on this project. You have no obligation to me. If you don't have time to help me right now, then don't. Be with your partner or have your lesiure time. I'm not stopping you. But don't tell me not to contribute.

I'm simply reporting you information the error logs said to report. I'm just following the instructions on Contributing section to the best of my ability along with the limited test suite instructions.

Moreover, I still ran per your instructions and am still getting errors. They say to report to you, so unless I'm doing something wrong, I'm technically helping, and this error is a flaw in the system (as confirmed by @erinxocon ).

pytest_output_PR2331_run003.txt

@techalchemy
Copy link
Member

Actually, I can ask you not to contribute-- you are mistaking my being a volunteer with my authority on the project, and you are conflating your desire to contribute with your right to do so. Just because this project is run by volunteers doesn't mean that nobody is in charge of it or that nobody has the final say over contributions or moderation. If you want to be productive on pipenv, telling its maintainers that you have the right to contribute whatever you want and that I can just leave anytime I want is probably not a good strategy. We definitely want more contributors, but we definitely don't want contributors who are going to place high demands on our time and be antagonistic.

If you're a volunteer, then by definition you don't have to spend any time that you don't have on this project. You have no obligation to me. If you don't have time to help me right now, then don't. Be with your partner or have your lesiure time. I'm not stopping you. But don't tell me not to contribute.

You are vastly misunderstanding how open source operates, Just because I am a volunteer doesn't mean I don't have an obligation to this project. It is used by hundreds of thousands of people to whom I am responsible if something is broken. I unfortunately don't have the luxury of simply dropping everything. I would strongly encourage you to watch https://www.youtube.com/watch?v=tzFWz5fiVKU

You are welcome to engage in productive discussions going forward. The test failures on your machine are not relevant, one is a non-deterministic resolution failure which we are aware of, and the other is a permissions issue related to you running this on windows while using your operating system.

@ghost
Copy link
Author

ghost commented Jun 10, 2018

@techalchemy Can we start over? I feel we got off on the wrong foot and I'm sorry. I was frustrated.

I respect your authority as the maintainer and completely understand its importance and necessity. I'm sorry if I came across as though I had the right to contribute. I do not. I apologize.

@techalchemy
Copy link
Member

@ahendry2688 you bet, clean slate is good with me, I am very appreciative of the conciliatory effort and I also apologize for my less-than-patient language. Thank you for reaching out again, I realize it would be much easier to walk away

@ghost
Copy link
Author

ghost commented Jun 10, 2018

@techalchemy So glad to hear it! And no worries. I had a chance to watch the YouTube video last night, and I must say that is quite a bit of work and responsibility! Thank you so much!

@ghost
Copy link
Author

ghost commented Jun 16, 2018

Hello @techalchemy and @erinxocon. I can confirm on my machine that PR #2331 has solved the issue of this PR! (Must clone repo into site-packages and install with pip install -e . as not yet available from current pipenv wheel using pip install pipenv.) Thank you so much for your help.

As an aside, I'm getting a few new interesting errors when trying to install packages now. This is a separate issue though. I'll post on StackOverflow to see if I can get any resolution on it, but here is the text file for your records.

locking_devpackages_errors.txt

Thank you again so much and have a great weekend!

@ghost ghost closed this as completed Jun 16, 2018
@techalchemy
Copy link
Member

@ahendry2688 if you're installing from the master branch you may want to uninstall and reinstall -- find us on slack over in #pipenv on https://pyslackers.com/ if you keep having issues with the development branch so we can get ahead of those errors before we release, I've seen a few like that but I can't remember specifically how they were resolved

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Issues suitable as a newcomer to get familiar with Pipenv! OS: Windows This issue affects the Windows Operating System. Type: Enhancement 💡 This is a feature or enhancement request.
Projects
None yet
Development

No branches or pull requests

4 participants