You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following is an excerpt of failure caused by running multiple pyright in subprocesses for first time in Github action:
npm error code EPERM
npm error syscall lstat
npm error path C:\Users\runneradmin\.cache\pyright-python\1.1.386\node_modules\pyright\dist\pyright-internal.js.map
npm error errno -4048
npm error [Error: EPERM: operation not permitted, lstat 'C:\Users\runneradmin\.cache\pyright-python\1.1.386\node_modules\pyright\dist\pyright-internal.js.map'] {
npm error errno: -4048,
npm error code: 'EPERM',
npm error syscall: 'lstat',
npm error path: 'C:\\Users\\runneradmin\\.cache\\pyright-python\\1.1.386\\node_modules\\pyright\\dist\\pyright-internal.js.map'
npm error }
npm error
npm error The operation was rejected by your operating system.
npm error It's possible that the file was already in use (by a text editor or antivirus),
npm error or that you lack permissions to access it.
npm error
npm error If you believe this might be a permissions issue, please double-check the
npm error permissions of the file and its containing directories, or try running
npm error the command again as root/Administrator.
npm error A complete log of this run can be found in: C:\Users\runneradmin\npm-cache\_logs\2024-10-31T17_47_42_564Z-debug-0.log
Traceback (most recent call last):
File "C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\runpy.py", line 196, in _run_module_as_mainreturn _run_code(code, main_globals, None,
File "C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\runpy.py", line 86, in _run_codeexec(code, run_globals)
File "D:\a\types-lxml\types-lxml\.tox\py310-rt-lxml50\Scripts\pyright.EXE\__main__.py", line 7, in <module>
File "D:\a\types-lxml\types-lxml\.tox\py310-rt-lxml50\lib\site-packages\pyright\cli.py", line 31, in entrypoint
sys.exit(main(sys.argv[1:]))
File "D:\a\types-lxml\types-lxml\.tox\py310-rt-lxml50\lib\site-packages\pyright\cli.py", line 18, in mainreturn run(*args, **kwargs).returncode
File "D:\a\types-lxml\types-lxml\.tox\py310-rt-lxml50\lib\site-packages\pyright\cli.py", line 22, in run
pkg_dir = install_pyright(args, quiet=None)
File "D:\a\types-lxml\types-lxml\.tox\py310-rt-lxml50\lib\site-packages\pyright\_utils.py", line 63, in install_pyright
node.run(
File "D:\a\types-lxml\types-lxml\.tox\py310-rt-lxml50\lib\site-packages\pyright\node.py", line 144, in run
subprocess.run(node_args, **kwargs),
File "C:\hostedtoolcache\windows\Python\3.10.11\x64\lib\subprocess.py", line 526, in runraise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['C:\\Program Files\\nodejs\\npm.cmd', 'install', '[email protected]']' returned non-zero exit status 4294963248.
This looks like a conflict of multiple invocation of npm install and write into the same cache folder. While end users normally wouldn't call pyright like this, it is quite possible for Github runners where packages are installed anew. For my case it is invoked by tox running multiple test environments in different venv in parallel. The above failure happens sparingly in ubuntu and macos runners, but at high probability for windows runners.
For now I worked around the problem by pre-running pyright once to trigger the install process before running tests. As #300 is not a default for pyright-python, would it be better to be fool-proof by guarding npm install with temp file locking?
The text was updated successfully, but these errors were encountered:
Following is an excerpt of failure caused by running multiple
pyright
in subprocesses for first time in Github action:This looks like a conflict of multiple invocation of
npm install
and write into the same cache folder. While end users normally wouldn't callpyright
like this, it is quite possible for Github runners where packages are installed anew. For my case it is invoked bytox
running multiple test environments in different venv in parallel. The above failure happens sparingly in ubuntu and macos runners, but at high probability for windows runners.For now I worked around the problem by pre-running
pyright
once to trigger the install process before running tests. As #300 is not a default forpyright-python
, would it be better to be fool-proof by guardingnpm install
with temp file locking?The text was updated successfully, but these errors were encountered: