-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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 install fails if subdirectory cannot be traversed #4906
Comments
Just noting that while this issue report provides a potential way to reproduce the issue, it does also sound very similar to: #4898 |
@jtmoon79 I am not setup well to test your example presently (or am afraid to try it) but could you re-check this behavior with the current master branch and see if its the same (there have been a couple windows fixes recently). Also if that doesn't work still can you triage it with this branch: Doing so will help determine if this issue has a resolution already or require additional work. |
@matteius I was unable to reproduce this Issue #4906 due to another problem running I was blocked by a
I tried several permutations of python interpreter versions, virtualenvs, and the pipenv branch For review, I installed the in-development
I did not find an Issue with this failure. I'll give this another try some other time. |
@jtmoon79 I will investigate the setup.py install command, it was not working for me either--instead I'ev had to do However, I found something that is worth investigating with respect to current environment variables. Try setting I would like to hear more of your experience with this as I am starting to get more familiar with the codebase. |
This Issue #4906 did not occur in branch Using command review of reproduction steps: Invoke-WebRequest "https://github.com/pypa/pipenv/archive/refs/heads/vendor-pip-22.0.3-followup-changes.zip" -out vendor-pip-22.0.3-followup-changes.zip
Expand-Archive .\vendor-pip-22.0.3-followup-changes.zip
cd .\vendor-pip-22.0.3-followup-changes\pipenv-vendor-pip-22.0.3-followup-changes\
python.exe .\setup.py develop --user
cd ..
mkdir a
cd a
function RemoveNTFSPermissions($path, $object, $permission) {
$FileSystemRights = [System.Security.AccessControl.FileSystemRights]$permission
$InheritanceFlag = [System.Security.AccessControl.InheritanceFlags]"ContainerInherit, ObjectInherit"
$PropagationFlag = [System.Security.AccessControl.PropagationFlags]"None"
$AccessControlType =[System.Security.AccessControl.AccessControlType]::Allow
$Account = New-Object System.Security.Principal.NTAccount($object)
$FileSystemAccessRule = New-Object System.Security.AccessControl.FileSystemAccessRule($Account, $FileSystemRights, $InheritanceFlag, $PropagationFlag, $AccessControlType)
$DirectorySecurity = Get-ACL $path
$DirectorySecurity.RemoveAccessRuleAll($FileSystemAccessRule)
Set-ACL $path -AclObject $DirectorySecurity
}
function RemoveInheritance($path) {
$isProtected = $true
$preserveInheritance = $true
$DirectorySecurity = Get-ACL $path
$DirectorySecurity.SetAccessRuleProtection($isProtected, $preserveInheritance)
Set-ACL $path -AclObject $DirectorySecurity
}
mkdir ".\test-noaccess"
RemoveInheritance ".\test-noaccess"
RemoveNTFSPermissions ".\test-noaccess" "HOST\user1" "Modify, ChangePermissions, ExecuteFile, ListDirectory, FullControl, Read, ReadAndExecute, ReadAttributes, Traverse, Write, WriteData, WriteExtendedAttributes"
python.exe -m pipenv install |
Awesome, I am glad to hear @jtmoon79 -- we can leave this open until that branch makes it to an official release. We are waiting on a couple upstream PRs for that to happen, but with a little luck could happen in April. There is likely to be another release between now and then as well that may not include this change yet. |
I believe this is resolvable now -- but let me know if its still an issue on |
I was unable to reproduce the issue using However, I was unable to reproduce the issue using I spent about an hour attempting to reproduce the original issue with the reported version FWIW |
It's possible this was fixed by the newer versions of setuptools. |
Issue description
python -m pipenv install
will raise an Error while traversing directories if a subdirectory cannot be accessed. Theinstall
process fails.Expected result
python -m pipenv install
should catch access errors, print a warning (PermissionError: cannot access path '.\foo'
), and then continue processing.Actual result
python -m pipenv install
fails, python process exits. User cannot proceed with project development.Steps to replicate
Administrator
.(Snippet from SO)
$path1
and$user1
user1
Details
$ pipenv --support
Pipenv version:
'2021.11.23'
Pipenv location:
'C:\\Users\\user1\\.virtualenvs\\project1-IrhwCFbf\\lib\\site-packages\\pipenv'
Python location:
'C:\\Users\\user1\\.virtualenvs\\project1-IrhwCFbf\\Scripts\\python.exe'
Python installations found:
3.9.6
:C:\python.org.3.9.6\python.exe
PEP 508 Information:
System environment variables:
PIPENV_ACTIVE
PIP_DISABLE_PIP_VERSION_CHECK
PIP_PYTHON_PATH
Pipenv–specific environment variables:
PIPENV_ACTIVE
:1
Contents of
Pipfile
(C:\\Users\\user1\\project1\\Pipfile
):Contents of
Pipfile.lock
('C:\Users\user1\Project1\Pipfile.lock'):The text was updated successfully, but these errors were encountered: