-
Notifications
You must be signed in to change notification settings - Fork 56
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
"There is no formatter for 'python' files installed." #460
Comments
Have you tried setting the following in your {
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff"
}
} |
No, but is such a setting necessary to use ruff as a Python formatter? |
I don't believe so, but I've also never run into the message you're seeing above once I've installed the extension. I also just verified that if I uninstall the extension, I see that message; and if I then install it and run "Format Document", the document formats and I see no such message. Anything other info you can provide? It seems like an issue with the VS Code setup rather than the extension specifically. |
Ok I just created a
I'm working in a dev container with the ruff extension installed in the container. I'm running on aarch64-darwin. Here is my |
Same issue here: Ubuntu 22.04, used to work before, not sure what changed. Here's the traceback:
|
Never mind. Mine was a strange one, I was working in a VS Code workspace with two folders, just removed one (AutoEIS, which is |
Got the same error message but downgraded to the version |
@MalteHB are you using VS Code dev containers where you're facing this? If not, can you open a new issue for it with all the relevant details about your setup and config? |
I can confirm this. I used It works btw locally with the newest version. |
I wonder if the ruff server fails to start for some reason and, as a result thereof, the formatter capability doesn't get registered. Would you mind sharing the Ruff logs with us by opening the logs and then run Ctrl+Shift+P - Ruff: Print debug information https://github.com/astral-sh/ruff-vscode?tab=readme-ov-file#troubleshooting |
In addition to the logs,
|
This only worked after downgrading to
now I feel like an idiot. Not sure what I messed up earlier. On v2024.30.0 though. |
Does it work on the latest VS Code version? |
No. I just updated and double-checked again. |
@kasi-mir33 Can you provide what's your setup is like? What are the extension settings that you've set? And, the full logs with the following settings: {
"ruff.trace.server": "messages",
"ruff.logLevel": "debug"
} |
for temporary solution I am using ruff cli to format files. ruff format ./path/to/python/file
# or
python -m ruff format ./path/to/python/file make sure you have installed the ruff using pip pip install --upgrade ruff ruff formatter docs: https://docs.astral.sh/ruff/formatter/ |
Any chance that you were seeing the native server enabled but using deprecated settings dialogue? If so, can you try to close it to see if Ruff then starts? See #557 |
Hi, to all the users who've subscribed to this issue, we've released a new version ( |
Resolved |
i have the same problem using the latest vrsion : v2024.42.0 and |
@issam-seghir can you open a new issue with necessary details about your environment? |
I have just installed the extension and reloaded my VSCode window. However, when attempted
Cmd+P => Format document
, I'm now faced with an error modal dialog:The text was updated successfully, but these errors were encountered: