10000 Unhelpful error message related to unresolvable python version · Issue #421 · actions/setup-python · GitHub
[go: up one dir, main page]

Skip to content
Unhelpful error message related to unresolvable python version #421
Closed
@scop

Description

@scop

Description:
When neither python-version or python-version-file is set, and there is no version file matching python-version-file's default (.python-version), the error message could use an improvement. Currently it is not helpful, and even somewhat confusing.

Action version:
v4.0.0

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Tools version:

All.

Repro steps:
https://github.com/scop/bash-completion/runs/6798283007?check_suite_focus=true#step:3:1

Expected behavior:
Helpful error message. For example:

Error: Could not determine Python version to set up. Please either specify a version using python-version in the action configuration, or path to a valid version file using python-version-file. The version file currently in effect, /home/runner/work/bash-completion/bash-completion/.python-version, does not exist.

Actual behavior:
Unhelpful error message:

Error: The specified python version file at: /home/runner/work/bash-completion/bash-completion/.python-version does not exist

There are two problems with this:

  1. I did not specify a python version file
  2. It's kind of an unexpected change coming from setup-python v3, and does not point towards a good way to fix it. The only hint is towards pointing to .python-version which isn't arguably good advice, because those files in many workflows are not something that are supposed to be checked in to git in the first place, because they are expected to contain for example pyenv virtual env names which are specific to developer local setups, not something to share. In that sense, it is also a quite unfortunate default.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0