containers / ramalama

The goal of RamaLama is to make working with AI boring.
MIT License
280 stars 48 forks source link

huggingface login fail #465

Closed bentito closed 6 days ago

bentito commented 6 days ago

The docs say:

ramalama login --token=XYZ huggingface

I try on an m2 macbook pro running python 3.13.0:

$ ramalama login --token=$HF_TOKEN huggingface
os.execvp(None, [None, 'login', 'huggingface'])
Traceback (most recent call last):
  File "/opt/homebrew/bin/ramalama", line 92, in <module>
    main(sys.argv[1:])
    ~~~~^^^^^^^^^^^^^^
  File "/opt/homebrew/bin/ramalama", line 67, in main
    args.func(args)
    ~~~~~~~~~^^^^^^
  File "/Users/btofel/.local/pipx/venvs/ramalama/lib/python3.13/site-packages/ramalama/cli.py", line 284, in login_cli
    return model.login(args)
           ~~~~~~~~~~~^^^^^^
  File "/Users/btofel/.local/pipx/venvs/ramalama/lib/python3.13/site-packages/ramalama/oci.py", line 70, in login
    return exec_cmd(conman_args, debug=args.debug)
  File "/Users/btofel/.local/pipx/venvs/ramalama/lib/python3.13/site-packages/ramalama/common.py", line 75, in exec_cmd
    return os.execvp(args[0], args)
           ~~~~~~~~~^^^^^^^^^^^^^^^
  File "<frozen os>", line 611, in execvp
  File "<frozen os>", line 633, in _execvpe
  File "<frozen posixpath>", line 177, in dirname
TypeError: expected str, bytes or os.PathLike object, not NoneType

I confirmed the env var is set to my token as expected. I also tried just putting my token on the CLI. No joy.

bentito commented 6 days ago

I confirmed latest ramalama:

$ pipx upgrade ramalama
ramalama is already at latest version 0.1.1 (location: /Users/btofel/.local/pipx/venvs/ramalama)
rhatdan commented 6 days ago

Thanks @bentito working on a fix.