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

poetry run gives a cryptic FileNotFoundError if the command does not exist #3883

Closed
2 tasks done
SeriousBug opened this issue Apr 6, 2021 · 4 comments
Closed
2 tasks done
Labels
status/duplicate Duplicate issues

Comments

@SeriousBug
Copy link

  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.

Feature Request

Consider the following run:

$ poetry run does-not-exist

  FileNotFoundError

  [Errno 2] No such file or directory

  at /usr/lib/python3.9/os.py:607 in _execvpe
       603│         path_list = map(fsencode, path_list)
       604│     for dir in path_list:
       605│         fullname = path.join(dir, file)
       606│         try:
    →  607│             exec_func(fullname, *argrest)
       608│         except (FileNotFoundError, NotADirectoryError) as e:
       609│             last_exc = e
       610│         except OSError as e:
       611│             last_exc = e

This is confusing to look at. It would make sense to provide an actual error message if a package is missing. Something like the following would be much better:

$ poetry run does-not-exist

Error: Command does-not-exist doesn't exist. Please check that it is installed, and that the command name is spelled correctly.
@SeriousBug SeriousBug added kind/feature Feature requests/implementations status/triage This issue needs to be triaged labels Apr 6, 2021
@dimaqq
Copy link
Contributor

dimaqq commented Jul 21, 2021

The label should be bug or cleanup or maybe improvement. Not a feature 🤔

@pbsds
Copy link

pbsds commented Feb 17, 2022

Related: #4963 #3541 #2455

@branchvincent
Copy link
Member

Appreciate the report! There are quite a few issues around this so I'm going to mark it as a duplicate of #1567, but note I'm currently working on a fix

@branchvincent branchvincent added status/duplicate Duplicate issues and removed kind/feature Feature requests/implementations status/triage This issue needs to be triaged labels Feb 27, 2022
Copy link

github-actions bot commented Mar 2, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status/duplicate Duplicate issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants