A PermissionError is raised when using os.scandir with the conda-based application bundle.
I've noticed the same issue with Spyder as well with conda-based application bundle.
This issue only manifests with the three user directories ~/Desktop, ~/Documents, and ~/Downloads (and anything therein). No other directories on the system produce the error.
Interestingly, this issue does not manifest when launching the application executable directly.
I've observed identical behavior on two separate machines:
iMac with arm64 running 12.5.1
Macbook Pro with x86_64 running 12.5.1
To Reproduce
Steps to reproduce the behavior:
Launch condo-based napari application bundle napari (0.4.16rc7).app from Finder
View the iPython console
Attempt os.scandir for any of the three user directories ~/Desktop, ~/Documents, or ~/Downloads
Observe the error
In [1]: import os
In [2]: os.scandir('/Users/ryan/')
Out[2]: <posix.ScandirIterator at 0x179e18960>
In [3]: os.scandir('/Users/ryan/Documents/')
---------------------------------------------------------------------------
PermissionError Traceback (most recent call last)
Input In [3], in <cell line: 1>()
----> 1 os.scandir('/Users/ryan/Documents/')
PermissionError: [Errno 1] Operation not permitted: '/Users/ryan/Documents/'
/Users/ryan/Library/napari-0.4.16rc7/envs/napari-0.4.16rc7/lib/python3.9/site-packages/ipykernel/kernelbase.py:751: RuntimeWarning: coroutine 'InProcessKernel._abort_queues' was never awaited!
🐛 Bug
A
PermissionError
is raised when usingos.scandir
with the conda-based application bundle. I've noticed the same issue with Spyder as well with conda-based application bundle.This issue only manifests with the three user directories
~/Desktop
,~/Documents
, and~/Downloads
(and anything therein). No other directories on the system produce the error.Interestingly, this issue does not manifest when launching the application executable directly.
I've observed identical behavior on two separate machines:
To Reproduce
Steps to reproduce the behavior:
napari (0.4.16rc7).app
from Finderos.scandir
for any of the three user directories~/Desktop
,~/Documents
, or~/Downloads
Environment
napari: 0.4.16rc7 Platform: macOS-12.5.1-x86_64-i386-64bit System: MacOS 12.5.1 Python: 3.9.13 | packaged by conda-forge | (main, May 27 2022, 17:00:52) [Clang 13.0.1 ] Qt: 5.15.3 PySide2: 5.15.4 NumPy: 1.22.4 SciPy: 1.8.1 Dask: 2022.05.2 VisPy: 0.9.6
OpenGL:
Screens:
Plugins: