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

[error] Error: ENOENT: no such file or directory, stat - with temp pyc files #1300

Open
ssbarnea opened this issue May 6, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ssbarnea
Copy link
Member

ssbarnea commented May 6, 2024

Apparently our extension does try to do something with python compiled files from cache using a wrong path. Lots of such errors can be seen on Output > Extension Host.

On my system I do have PYTHONPYCACHEPREFIX=/Users/ssbarnea/.cache/cpython/ which should prevent python from creating pyc files on the location these were reported.

2024-04-30 12:39:03.268 [error] Error: ENOENT: no such file or directory, stat '/Users/ssbarnea/c/a/ansible-lint/test/local-content/test-roles-failed/roles/role3/library/__pycache__/test_module_3_failed.cpython-312-pytest-8.2.0.pyc.30262'
	at statSync (node:fs:1692:3)
	at t.statSync (node:electron/js2c/node_init:2:5052)
	at n.statSync (/Users/ssbarnea/.vscode/extensions/esbenp.prettier-vscode-10.4.0/dist/extension.js:1:3435)
	at o.value (/Users/ssbarnea/.vscode/extensions/redhat.ansible-24.4.1783911/out/client/src/extension.js:2:428454)
	at s.y (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:82:659)
	at s.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:82:876)
	at o.value (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:152:87335)
	at s.y (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:82:659)
	at s.z (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:82:729)
	at s.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:82:945)
	at D.$onFileEvent (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:152:88614)
	at u.S (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:149:5502)
	at u.Q (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:149:5268)
	at u.M (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:149:4361)
	at u.L (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:149:3440)
	at o.value (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:149:2227)
	at s.y (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:82:659)
	at s.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:82:876)
	at r.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:107:14173)
	at o.value (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:175:8018)
	at s.y (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:82:659)
	at s.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:82:876)
	at r.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:107:14173)
	at MessagePortMain.<anonymous> (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:175:6298)
	at MessagePortMain.emit (node:events:517:28)
	at MessagePortMain._internalPort.emit (node:electron/js2c/utility_init:2:2285)

Another case, non python related:

2024-04-30 12:42:41.822 [error] Error: ENOENT: no such file or directory, stat '/Users/ssbarnea/c/a/ansible-lint/examples/roles/name_prefix/tasks/test.tmp.yml'
	at statSync (node:fs:1692:3)
	at t.statSync (node:electron/js2c/node_init:2:5052)
	at n.statSync (/Users/ssbarnea/.vscode/extensions/esbenp.prettier-vscode-10.4.0/dist/extension.js:1:3435)
	at o.value (/Users/ssbarnea/.vscode/extensions/redhat.ansible-24.4.1783911/out/client/src/extension.js:2:428454)
	at s.y (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:82:659)
	at s.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:82:876)
	at o.value (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:152:87335)
	at s.y (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:82:659)
	at s.z (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:82:729)
	at s.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:82:945)
	at D.$onFileEvent (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:152:88614)
	at u.S (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:149:5502)
	at u.Q (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:149:5268)
	at u.M (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:149:4361)
	at u.L (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:149:3440)
	at o.value (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:149:2227)
	at s.y (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:82:659)
	at s.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:82:876)
	at r.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:107:14173)
	at o.value (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:175:8018)
	at s.y (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:82:659)
	at s.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:82:876)
	at r.fire (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:107:14173)
	at MessagePortMain.<anonymous> (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:175:6298)
	at MessagePortMain.emit (node:events:517:28)
	at MessagePortMain._internalPort.emit (node:electron/js2c/utility_init:2:2285)

I suspect it might be prettier integrated, still another temporary file which should be ignored.

Might be related to prettier/prettier-vscode#3063

@ssbarnea ssbarnea added the bug Something isn't working label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: No status
Development

No branches or pull requests

1 participant