koxudaxi / ruff-pycharm-plugin

PyCharm plugin for ruff. This plugin provides reformat code using ruff.
MIT License
173 stars 6 forks source link

Ruff: Ruff encountered a problem. Check the logs for more details. #463

Open jerodg opened 4 days ago

jerodg commented 4 days ago

Describe the bug Ruff: Ruff encountered a problem. Check the logs for more details. Where are the logs? This used to display the actual error in the notification window. The new error message is not helpful at all.

To Reproduce Steps to reproduce the behavior: Encounter an error.

Expected behavior Tell me what actually happened in the notification window as in the previous versions. Or in the very least include a clickable link to where the logs are stored.

Screenshots image

Environments (please complete the following information):

Additional context N/A

LiaoSW commented 4 days ago

I came across the same error

rh-sp commented 3 days ago

Log:

2024-07-02 13:27:51,068 [9457973]   INFO - #c.i.p.l.i.LspServerImpl - RuffServerServerDescriptor@<project>(Running;91): window/showMessage: Ruff encountered a problem. Check the logs for more details.
2024-07-02 13:27:51,069 [9457974]   WARN - #c.i.p.l.i.LspServerImpl - RuffServerServerDescriptor@<project>(Running;91): Error response from server: org.eclipse.lsp4j.jsonrpc.ResponseErrorException: A parsing error occurred during `fix_all

From Ruff 0.5.0 changelog:

From the announcement blog post:

Use --output-format=concise or the RUFF_OUTPUT_FORMAT environment variable to go back to a more concise output without code snippets:

rh-sp commented 1 day ago

In case of syntax errors, this message will also pop up with Ruff < 0.5.0. Might be related to ongoing changes in Ruff to their parser for handling syntax errors. Would be cool if the plugin could support this!

I am using ruff server, if that makes a difference.