Skip to content
This repository was archived by the owner on Aug 19, 2025. It is now read-only.
This repository was archived by the owner on Aug 19, 2025. It is now read-only.

Handle TokenNotSet Error more gracefully #76

Description

@ivyleavedtoadflax

Currently we get the following traceback:

Traceback (most recent call last):
  File "/home/matthew/.local/bin/hugie", line 5, in <module>
    from hugie.__main__ import app
  File "/home/matthew/.local/pipx/venvs/hugie/lib/python3.10/site-packages/hugie/__main__.py", line 7, in <module>
    from hugie.endpoint import app as endpoint_app
  File "/home/matthew/.local/pipx/venvs/hugie/lib/python3.10/site-packages/hugie/endpoint.py", line 27, in <module>
    raise TokenNotSet
hugie.endpoint.TokenNotSet: You need to define a token using the environment variable HUGGINGFACE_READ_TOKEN

Let's catch this and just print to console instead in a more friendly way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions