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

Exception during #329

Closed
grundew opened this issue Dec 8, 2023 · 6 comments
Closed

Exception during #329

grundew opened this issue Dec 8, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@grundew
Copy link

grundew commented Dec 8, 2023

ruff is configured to:

  • Run when the python file is saved
  • Run ruff when reformat code
  • Use ruff format

I get the following exception:
The following command was executed:

C:\Users\gw\venv311\Scripts\ruff.exe format --force-exclude --quiet -

The exit code: 2
The error output of the command:

Error Running Ruff
at com.koxudaxi.ruff.RuffKt.runCommand(Ruff.kt:251)
at com.koxudaxi.ruff.RuffKt.runCommand(Ruff.kt:190)
at com.koxudaxi.ruff.RuffKt.runRuff(Ruff.kt:329)
at com.koxudaxi.ruff.RuffApplyService.apply$lambda$2(RuffApplyService.kt:66)
at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:249)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:702)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:699)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:699)
at java.base/java.lang.Thread.run(Thread.java:840)

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Environments

  • IDE: [PyCharm Pro 2023.3]
  • OS: [windows 11]
  • Ruff Version [0.1.7]
  • Plugin version [e.g. 0.3.11 ]

Additional context
Add any other context about the problem here.

@EternityMar22
Copy link

I met the same problem.

@AntoineD
Copy link

Same too.

@johnthagen
Copy link

johnthagen commented Dec 18, 2023

I hit this when switching Projects sometimes.

macOS PyCharm Professional 20233.3.1.

@koxudaxi
Copy link
Owner

koxudaxi commented Dec 24, 2023

@grundew @1669026686 @AntoineD @johnthagen
I'm sorry for my late response
Thank you for posting the issue.
I will fix it.

@koxudaxi koxudaxi added the bug Something isn't working label Dec 24, 2023
@gSchurkus
Copy link

I believe to see the same or at least a related issue. I'll add some details here in the hope this helps.

Failure Details

plugin crashes at IDE start with

Exception in plugin Ruff (0.0.19).

Details include

ExternalToolPass: 

com.intellij.diagnostic.PluginException: annotator: com.koxudaxi.ruff.RuffExternalAnnotator@63039037 (class com.koxudaxi.ruff.RuffExternalAnnotator) [Plugin: com.koxudaxi.ruff]
	at com.intellij.diagnostic.PluginProblemReporterImpl.createPluginExceptionByClass(PluginProblemReporterImpl.java:23)
	at com.intellij.diagnostic.PluginException.createByClass(PluginException.java:89)
        ...
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: The following command was executed:

/home/user/.virtualenvs/myenv/bin/ruff --config /home/user/mysrc/pyproject.toml --exit-zero --no-cache --force-exclude --no-fix --format json --stdin-filename path/to/file.py -

The exit code: 2
The error output of the command:


error: unexpected argument '--format' found

  tip: to pass '--format' as a value, use '-- --format'

Version Info

IDE: IntelliJIdea 2023.1
OS: Linux
Ruff version: 0.1.11
Plugin Version: 0.0.19 (most recent in plugin store)


@koxudaxi Thank you for looking into it!

@koxudaxi
Copy link
Owner

koxudaxi commented Apr 2, 2024

I hope the problem has been resolved in v0.0.32
If you will meet the problem, then please leave a comment.
#409

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