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

1.26.0 - error when opening ssh:// - "Error handling readFile for: /pyproject.toml" #379

Closed
christianl3chn3r opened this issue Apr 11, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@christianl3chn3r
Copy link

I'm getting this error when opening ssh:// with VSCode. This happens with any host in my configured list.
VS Code version: 1.77.2
SSH FS version: 1.26
MacOS version: 13.3.1

Screenshot 2023-04-11 at 11 32 04 AM

@james-at-klik
Copy link

james-at-klik commented Apr 14, 2023

I can report the same issue.
Never worked with Python before, not sure what this is!
VS Code: 1.77.3
SSH FS: v1.26.0
MacOS: 11.4

Not sure if this is useful:
downgrading to VS Code 1.75 works, so it might be something with the latest release? (1.77)

@kfhunter
Copy link

Same error opening workspaces with SSH connections. The explorer tab just shows the connection or folder with the spinny never loading. I don't use any Python packages.
VSC 1.77.3
SSH FS 1.26.0
Windows 11

@David-COUDRAY
Copy link

Same error since a few weeks.
I don't use Python.

@banq
Copy link

banq commented Apr 15, 2023

me too ,fuck python

@SchoofsKelvin
Copy link
Owner

Took me a while to hunt down the root cause, but found it. From VS Code 1.76 and 1.77, their product.json file (present in the built application but not on the repository) got a new configBasedExtensionTips entry:

"python-formatter": {
	"configPath": "pyproject.toml",
	"configName": "Python Formatter",
	"recommendations": {
		"ms-python.black-formatter": {
			"name": "Black Formatter",
			"contentPattern": "(^\\s*\\[\\s*\"?tool\"?\\s*\\.\\s*\"?black\"?\\s*\\])|(\"black\\s*[\"[(<=>!~;@])"
		}
	}
}

So VS Code itself (not an extension, not even a built-in one) tries to read the pyproject.toml file without stat'ing it to check for its existence, which often doesn't exist hence the error. This (usually occurring after opening the Extensions view) is to suggest extension recommendations based on certain factors. This should've been ignored by the extension (only printing a small entry in the SSH FS output) but a mistake while fixing #282 enabled the notification by default for read errors too instead of just write errors.

I've just pushed a commit that fixes this (d878b78) which will be available in the next version of the extension (v1.26.1) which should be released later today.

@SchoofsKelvin SchoofsKelvin added the bug Something isn't working label Apr 16, 2023
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
None yet
Development

No branches or pull requests

6 participants