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

Error running v0.1.10 #9366

Closed
nickdrozd opened this issue Jan 2, 2024 · 6 comments
Closed

Error running v0.1.10 #9366

nickdrozd opened this issue Jan 2, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@nickdrozd
Copy link
Contributor

After installing v0.1.10 via pip:

python3.11 -m ruff --version
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/home/nick/.local/lib/python3.11/site-packages/ruff/__main__.py", line 32, in <module>
    ruff = os.fsdecode(find_ruff_bin())
                       ^^^^^^^^^^^^^^^
  File "/home/nick/.local/lib/python3.11/site-packages/ruff/__main__.py", line 25, in find_ruff_bin
    if path.is_file():
       ^^^^^^^^^^^^
AttributeError: 'str' object has no attribute 'is_file'
@charliermarsh
Copy link
Member

Ah thanks, I'll cut a follow-up release to fix this today.

@charliermarsh charliermarsh added the bug Something isn't working label Jan 2, 2024
@charliermarsh
Copy link
Member

If anyone is interested in a quick PR, welcome to it, otherwise I will :)

@zanieb
Copy link
Member

zanieb commented Jan 2, 2024

Thanks for the pull request! Could ya'll briefly describe how Python / Ruff is installed on your system? It looks like the test coverage in CI is for a different branch of the logic here.

@nickdrozd
Copy link
Contributor Author

I'm running some version of Ubuntu where the system python3 is python3.8. python3.11 is installed via apt, and ruff is installed via python3.11 -m pip.

@nickdrozd
Copy link
Contributor Author

which ruff => /home/nick/.local/bin/ruff. But

    ruff_exe = "ruff" + sysconfig.get_config_var("EXE")

    path = os.path.join(sysconfig.get_path("scripts"), ruff_exe)

path => /usr/local/bin/ruff, which is not a path that exists.

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

4 participants