SchoofsKelvin / vscode-sshfs

Extension for Visual Studio Code: File system provider using SSH
GNU General Public License v3.0
543 stars 36 forks source link

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

Closed christianl3chn3r closed 1 year ago

christianl3chn3r commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

banq commented 1 year ago

me too ,fuck python

SchoofsKelvin commented 1 year ago

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.