-
Notifications
You must be signed in to change notification settings - Fork 694
Closed
Description
Description
The error message for GatedRepoError asks the user to provide the --hf-token, even when the token is already passed via the command-line option. This is confusing for users who have already provided the token.
Expected Behavior:
If the --hf-token argument is passed, the error message should not request it again and should focus on other potential issues (e.g., access rights or incorrect token).
Current Behavior:
The error message currently states:
"Please ensure you have access to the repository and have provided the proper Hugging Face API token using the option --hf-token or by running huggingface-cli login. You can find your token by visiting https://huggingface.co/settings/tokens"
This should not appear if the --hf-token has already been provided.Steps to Reproduce:
- Pass a valid --hf-token when running the command.
- Encounter the GatedRepoError.
- Observe the message requesting the token, despite it being passed.

Suggested Fix:
The error message should only suggest providing the token if it wasn’t passed through the command-line argument.
Metadata
Metadata
Assignees
Labels
No labels