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

FileNotFoundError ruff' #262

Open
caph1993 opened this issue Jan 21, 2025 · 1 comment
Open

FileNotFoundError ruff' #262

caph1993 opened this issue Jan 21, 2025 · 1 comment

Comments

@caph1993
Copy link

In linux, running spin lint gives me this error.

Traceback (most recent call last):
  File "/usr/lib64/python3.11/subprocess.py", line 548, in run
    with Popen(*popenargs, **kwargs) as process:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib64/python3.11/subprocess.py", line 1955, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'ruff'

An internal error has occurred. Please file a bug report at

  https://github.com/scientific-python/spin

including the above traceback and the following information:

  spin: 0.13, package: numpy

Aborting.

Running ruff gives zsh: command not found: ruff, because it's not installed.

Running python -m pip install ruff fixes the issue, so there's an error with the dependencies. I'm in Python 3.11, OpenSUSE Tumbleweed.

@stefanv
Copy link
Member

stefanv commented Jan 21, 2025

Thanks @caph1993, this is a good reminder to improve that error message. I should do two things:

(1) Catch exceptions in run, so that they don't propagate through to this point and
(2) Not direct users to file bugs here when the traceback comes from a custom command.

For your specific case: in NumPy, the .spin/cmds.py lint command should be made more robust to deal with missing ruff.

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

No branches or pull requests

2 participants