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

Poor error message for NoVersionsError #76

Closed
peterbe opened this issue Sep 27, 2018 · 0 comments
Closed

Poor error message for NoVersionsError #76

peterbe opened this issue Sep 27, 2018 · 0 comments
Assignees

Comments

@peterbe
Copy link
Owner

peterbe commented Sep 27, 2018

E.g.

▶ hashin black
Traceback (most recent call last):
  File "/usr/local/bin/hashin", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/site-packages/hashin.py", line 499, in main
    include_prereleases=args.include_prereleases,
  File "/usr/local/lib/python3.6/site-packages/hashin.py", line 129, in run
    run_single_package(spec, *args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/hashin.py", line 157, in run_single_package
    include_prereleases=include_prereleases,
  File "/usr/local/lib/python3.6/site-packages/hashin.py", line 431, in get_package_hashes
    version = get_latest_version(data, include_prereleases)
  File "/usr/local/lib/python3.6/site-packages/hashin.py", line 243, in get_latest_version
    raise NoVersionsError(msg)
hashin.NoVersionsError: Not a single valid version found. But, found {0} pre-releases. Consider running again with the --include-prereleases flag.

The "Not a single valid version found" sounds vague and could be interpreted as "Not a single (as opposed to multiple) valid version found".

Also, the {0} was meant to fill in the number of prereleases found but it was never put into use.

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

1 participant