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

[Panic] Ruff crashed on ruff format - Os { code: 2, kind: NotFound } #16017

Closed
Programmer-RD-AI opened this issue Feb 7, 2025 · 2 comments
Closed
Labels
question Asking for support or clarification

Comments

@Programmer-RD-AI
Copy link

Ruff crashed while running ruff format. The error message indicates a missing file or directory:

error: Ruff crashed. If you could open an issue at:

    https://github.com/astral-sh/ruff/issues/new?title=%5BPanic%5D

...quoting the executed command, along with the relevant file contents and `pyproject.toml` settings, we'd be very appreciative!

thread 'main' panicked at /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/path-dedot-3.1.1/src/lib.rs:330:70:
called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Steps to Reproduce:

  1. Run ruff format on the project.
  2. Observe the crash.

Environment:

  • Python version: 3.11.5
  • OS: Ubuntu 24.04.1 LTS (WSL)
@MichaReiser
Copy link
Member

Thanks for the detailed write up.

The error message would suggest that the current working directory was deleted. Can you cd out of the current directory and cd into it again to verify that it still exists?

Relevant lines in path-dedot: https://github.com/magiclen/path-dedot/blob/36c197f922d4c8779594ce25b8ffc6cb0315c6a8/src/lib.rs#L328C1-L330C80

@MichaReiser MichaReiser added the question Asking for support or clarification label Feb 7, 2025
@Programmer-RD-AI
Copy link
Author

Thank you for the prompt response! That was indeed the issue—switching directories and running the command again resolved it. Appreciate the help :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Asking for support or clarification
Projects
None yet
Development

No branches or pull requests

2 participants