Skip to content

PermissionError: [WinError 5] Access is denied: 'C:\\Documents and Settings' #12036

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

Closed
ZzEeKkAa opened this issue Feb 26, 2024 · 2 comments
Closed

Comments

@ZzEeKkAa
Copy link

ZzEeKkAa commented Feb 26, 2024

a detailed description of the bug or problem you are having

Github CI starts failing on Windows since 8.0.2 release inside conda environment. Observed in multiple repos.
Most likely regression bug, since it appeared only over the weekend with 8.0.2 release. Downgrading to 8.0.1 solved the problem. May be due to this commit:
8d9b95d

Workaround

Downgrade to 8.0.1

output of conda list from the virtual environment you are using

# packages in environment at C:\Users\runneradmin\miniconda3\envs\test:
#
# Name                    Version                   Build  Channel
archspec                  0.2.2              pyhd8ed1ab_0    conda-forge
attrs                     23.2.0             pyh71513ae_0    conda-forge
beautifulsoup4            4.12.3             pyha770c72_0    conda-forge
boltons                   23.1.1             pyhd8ed1ab_0    conda-forge
brotli-python             1.1.0            py39h99910a6_1    conda-forge
bzip2                     1.0.8                hcfcfb64_5    conda-forge
ca-certificates           2024.2.2             h56e8100_0    conda-forge
certifi                   2024.2.2           pyhd8ed1ab_0    conda-forge
cffi                      1.16.0           py39ha55989b_0    conda-forge
chardet                   5.2.0            py39hcbf5309_1    conda-forge
charset-normalizer        3.3.2              pyhd8ed1ab_0    conda-forge
click                     8.1.7           win_pyh7428d3b_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_0    conda-forge
conda                     24.1.2           py39hcbf5309_0    conda-forge
conda-build               24.1.2           py39hcbf5309_0    conda-forge
conda-index               0.4.0              pyhd8ed1ab_0    conda-forge
conda-libmamba-solver     24.1.0             pyhd8ed1ab_0    conda-forge
conda-package-handling    2.2.0              pyh38be061_0    conda-forge
conda-package-streaming   0.9.0              pyhd8ed1ab_0    conda-forge
conda-tree                1.1.0              pyhd8ed1ab_2    conda-forge
coverage                  7.4.3            py39ha55989b_1    conda-forge
distro                    1.9.0              pyhd8ed1ab_0    conda-forge
dpcpp-cpp-rt              2024.0.2            intel_49896    intel
dpcpp-llvm-spirv          2024.0.0        py39h717461b_49602    intel
dpctl                     0.17.0dev0      py39h859585b_20    dppy/label/dev
dpnp                      0.15.0dev0      py39h2e52968_16    dppy/label/dev
exceptiongroup            1.2.0              pyhd8ed1ab_2    conda-forge
filelock                  3.13.1             pyhd8ed1ab_0    conda-forge
fmt                       10.2.1               h181d51b_0    conda-forge
icc_rt                    2024.0.2            intel_49896    intel
idna                      3.6                pyhd8ed1ab_0    conda-forge
importlib_resources       6.1.2              pyhd8ed1ab_0    conda-forge
iniconfig                 2.0.0              pyhd8ed1ab_0    conda-forge
intel-cmplr-lib-rt        2024.0.2            intel_49896    intel
intel-cmplr-lic-rt        2024.0.2            intel_49896    intel
intel-opencl-rt           2024.0.2            intel_49896    intel
intel-openmp              2024.0.2            intel_49896    intel
jinja2                    3.1.3              pyhd8ed1ab_0    conda-forge
jsonpatch                 1.33               pyhd8ed1ab_0    conda-forge
jsonpointer               2.4              py39hcbf5309_3    conda-forge
jsonschema                4.21.1             pyhd8ed1ab_0    conda-forge
jsonschema-specifications 2023.12.1          pyhd8ed1ab_0    conda-forge
krb5                      1.21.2               heb0366b_0    conda-forge
libarchive                3.7.2                h313118b_1    conda-forge
libblas                   3.9.0           21_win64_openblas    conda-forge
libcblas                  3.9.0           21_win64_openblas    conda-forge
libcurl                   8.5.0                hd5e4a3a_0    conda-forge
libffi                    3.4.4                hd77b12b_0  
libflang                  5.0.0           h6538335_20180525    conda-forge
libhwloc                  2.9.3           default_haede6df_1009    conda-forge
libiconv                  1.17                 hcfcfb64_2    conda-forge
liblapack                 3.9.0           21_win64_openblas    conda-forge
liblief                   0.12.3               h63175ca_0    conda-forge
libmamba                  1.5.6                h3f09ed1_0    conda-forge
libmambapy                1.5.6            py39h2690a07_0    conda-forge
libopenblas               0.3.26          pthreads_hc140b1d_0    conda-forge
libsolv                   0.7.28               h12be248_0    conda-forge
libsqlite                 3.45.1               hcfcfb64_0    conda-forge
libssh2                   1.11.0               h7dfc565_0    conda-forge
libxml2                   2.12.5               hc3477c8_0    conda-forge
libzlib                   1.2.13               hcfcfb64_5    conda-forge
llvm-meta                 5.0.0                         0    conda-forge
llvmlite                  0.42.0           py39hd28a505_1    conda-forge
lz4-c                     1.9.4                hcfcfb64_0    conda-forge
lzo                       2.10              he7745[22](https://github.com/IntelPython/numba-dpex/actions/runs/8034588423/job/21988809424#step:15:23)_1000    conda-forge
m2-conda-epoch            20[23](https://github.com/IntelPython/numba-dpex/actions/runs/8034588423/job/21988809424#step:15:24)0914               0_x86_64    conda-forge
m2-patch                  2.7.6.2              hd8ed1ab_0    conda-forge
markupsafe                2.1.5            py39ha55989b_0    conda-forge
menuinst                  2.0.2            py39h99910a6_0    conda-forge
mkl                       20[24](https://github.com/IntelPython/numba-dpex/actions/runs/8034588423/job/21988809424#step:15:25).0.0            intel_49657    intel
mkl-dpcpp                 2024.0.0            intel_49657    intel
more-itertools            10.2.0             pyhd8ed1ab_0    conda-forge
networkx                  3.2.1              pyhd8ed1ab_0    conda-forge
numba                     0.59.0           py39h6836801_1    conda-forge
numba-dpex                0.22.1          py39h2e52968_[25](https://github.com/IntelPython/numba-dpex/actions/runs/8034588423/job/21988809424#step:15:26)    file:///D:/a/numba-dpex/numba-dpex/channel
numpy                     1.[26](https://github.com/IntelPython/numba-dpex/actions/runs/8034588423/job/21988809424#step:15:27).4           py39hddb5d58_0    conda-forge
onemkl-sycl-blas          2024.0.0            intel_49657    intel
onemkl-sycl-datafitting   2024.0.0            intel_49657    intel
onemkl-sycl-dft           2024.0.0            intel_49657    intel
onemkl-sycl-lapack        2024.0.0            intel_49657    intel
onemkl-sycl-rng           2024.0.0            intel_49657    intel
onemkl-sycl-sparse        2024.0.0            intel_49657    intel
onemkl-sycl-stats         2024.0.0            intel_49657    intel
onemkl-sycl-vm            2024.0.0            intel_49657    intel
openmp                    5.0.0                    vc14_1    conda-forge
openssl                   3.2.1                hcfcfb64_0    conda-forge
packaging                 23.2               pyhd8ed1ab_0    conda-forge
pip                       24.0               pyhd8ed1ab_0    conda-forge
pkginfo                   1.9.6              pyhd8ed1ab_0    conda-forge
pkgutil-resolve-name      1.3.10             pyhd8ed1ab_1    conda-forge
platformdirs              4.2.0              pyhd8ed1ab_0    conda-forge
pluggy                    1.4.0              pyhd8ed1ab_0    conda-forge
psutil                    5.9.8            py39ha55989b_0    conda-forge
pthreads-win32            2.9.1                hfa6e2cd_3    conda-forge
py-lief                   0.12.3           py39h99910a6_0    conda-forge
pybind11-abi              4                    hd8ed1ab_3    conda-forge
pycosat                   0.6.6            py39ha55989b_0    conda-forge
pycparser                 2.21               pyhd8ed1ab_0    conda-forge
pysocks                   1.7.1            py39hcbf5309_5    conda-forge
pytest                    8.0.2              pyhd8ed1ab_0    conda-forge
pytest-cov                4.1.0              pyhd8ed1ab_0    conda-forge
python                    3.9.18          h4de0772_1_cpython    conda-forge
python-libarchive-c       5.0              py39hcbf5309_2    conda-forge
python_abi                3.9                      4_cp39    conda-forge
pytz                      2024.1             pyhd8ed1ab_0    conda-forge
pyyaml                    6.0.1            py39ha55989b_1    conda-forge
referencing               0.33.0             pyhd8ed1ab_0    conda-forge
reproc                    14.2.4.post0         hcfcfb64_1    conda-forge
reproc-cpp                14.2.4.post0         h63175ca_1    conda-forge
requests                  2.31.0             pyhd8ed1ab_0    conda-forge
ripgrep                   11.0.2                        1    conda-forge
rpds-py                   0.18.0           py39hf21820d_0    conda-forge
ruamel.yaml               0.18.6           py39ha55989b_0    conda-forge
ruamel.yaml.clib          0.2.8            py39ha55989b_0    conda-forge
setuptools                69.1.1             pyhd8ed1ab_0    conda-forge
soupsieve                 2.5                pyhd8ed1ab_1    conda-forge
tbb                       2021.11.0            h91493d7_1    conda-forge
tk                        8.6.13               h5226925_1    conda-forge
toml                      0.10.2             pyhd8ed1ab_0    conda-forge
tomli                     2.0.1              pyhd8ed1ab_0    conda-forge
tqdm                      4.66.2             pyhd8ed1ab_0    conda-forge
tzdata                    2024a                h0c530f3_0    conda-forge
ucrt                      10.0.22621.0         h579[28](https://github.com/IntelPython/numba-dpex/actions/runs/8034588423/job/21988809424#step:15:29)b3_0    conda-forge
urllib3                   2.2.1              pyhd8ed1ab_0    conda-forge
vc                        14.3                hcf57466_18    conda-forge
vc14_runtime              14.38.33130         h82b7239_18    conda-forge
vs2015_runtime            14.38.33130         hcb4865c_18    conda-forge
wheel                     0.42.0             pyhd8ed1ab_0    conda-forge
win_inet_pton             1.1.0            py39hcbf5309_5    conda-forge
xz                        5.4.5                h8cc25b3_0  
yaml                      0.2.5                h8ffe710_2    conda-forge
yaml-cpp                  0.8.0                h63175ca_0    conda-forge
zipp                      3.17.0             pyhd8ed1ab_0    conda-forge
zstandard                 0.22.0           py39h95af8[29](https://github.com/IntelPython/numba-dpex/actions/runs/8034588423/job/21988809424#step:15:30)_0    conda-forge
zstd                      1.5.5                h12be2[48](https://github.com/IntelPython/numba-dpex/actions/runs/8034588423/job/21988809424#step:15:49)_0    conda-forge

pytest and operating system versions

8.0.2, Windows Public Github CI

minimal example if possible

Pytest run inside conda environment inside windows-latest github ci

python -m pytest -q -ra --disable-warnings --pyargs numba_dpex -vv

The output log

Run python -m pytest -q -ra --disable-warnings --pyargs numba_dpex -vv
============================= test session starts =============================
platform win32 -- Python 3.9.18, pytest-8.0.2, pluggy-1.4.0 -- C:\Users\runneradmin\miniconda3\envs\test\python.exe
cachedir: .pytest_cache
rootdir: D:\a\numba-dpex\numba-dpex
configfile: pyproject.toml
plugins: cov-4.1.0
collecting ... collected 2953 items / 1 error
=================================== ERRORS ====================================
________________________ ERROR collecting test session ________________________
C:\Users\runneradmin\miniconda3\envs\test\lib\site-packages\_pytest\runner.py:342: in from_call
    result: Optional[TResult] = func()
C:\Users\runneradmin\miniconda3\envs\test\lib\site-packages\_pytest\runner.py:387: in collect
    return list(collector.collect())
C:\Users\runneradmin\miniconda3\envs\test\lib\site-packages\_pytest\main.py:508: in collect
    for direntry in scandir(self.path):
C:\Users\runneradmin\miniconda3\envs\test\lib\site-packages\_pytest\pathlib.py:701: in scandir
    with os.scandir(path) as s:
E   PermissionError: [WinError 5] Access is denied: 'C:\\Documents and Settings'
=========================== short test summary info ===========================
ERROR ::::Documents and Settings - PermissionError: [WinError 5] Access is denied: 'C:\\Documents and Settings'
!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
======================== 2 warnings, 1 error in 3.[27](https://github.com/IntelPython/numba-dpex/actions/runs/8051468532/job/21990196799?pr=1366#step:20:28)s =========================

https://github.com/IntelPython/numba-dpex/actions/runs/8034588423/job/21988809424

@eleanorjboyd
Copy link

I am experiencing this issue as well, I see it on https://github.com/microsoft/vscode-python/actions/runs/7992930338/job/21969228716 where I get ERROR ::::Documents and Settings - PermissionError: [WinError 5] Access is denied: 'C:\\Documents and Settings' on a test. The test creates a test directory then attempts to search for tests in it.

@bluetech
Copy link
Member

Closing as a duplicate of #11904.

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

3 participants