bentoml / BentoML

The easiest way to serve AI apps and models - Build Model Inference APIs, Job queues, LLM apps, Multi-model pipelines, and much more!
https://bentoml.com
Apache License 2.0
7.13k stars 792 forks source link

missing 1 required positional argument: 'email' #2347

Closed jsuchome closed 2 years ago

jsuchome commented 2 years ago

Describe the bug

bentoml yatai login fails with missing 1 required positional argument: 'email' error

To Reproduce

  1. Install bentoml==1.0.0a6
  2. Set up Yatai server, generate api token
  3. call bentoml yatai login --api-token <token> --endpoint <endpoint>

Expected behavior

Screenshots/Logs

Traceback (most recent call last):
  File "/home/jiri/miniconda3/envs/bentoml/bin/bentoml", line 8, in <module>
    sys.exit(cli())
  File "/home/jiri/miniconda3/envs/bentoml/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/jiri/miniconda3/envs/bentoml/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/jiri/miniconda3/envs/bentoml/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/jiri/miniconda3/envs/bentoml/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/jiri/miniconda3/envs/bentoml/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/jiri/miniconda3/envs/bentoml/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/jiri/miniconda3/envs/bentoml/lib/python3.7/site-packages/bentoml/_internal/cli/yatai.py", line 36, in login
    api_token=api_token,
TypeError: __init__() missing 1 required positional argument: 'email'

Environment:

Additional context

This is apparently caused by https://github.com/bentoml/BentoML/pull/2323

jsuchome commented 2 years ago

As a local hotfix, I just added fake email entry to _internal/cli/yatai.py:

        ctx = YataiClientContext(
            name=default_context_name,
            endpoint=endpoint,
            api_token=api_token,
            email='test@email.com'
        )
yetone commented 2 years ago

Thanks for the report, I've fixed it

parano commented 2 years ago

@yetone is this due to the recent change on email & admin account? should we set up an e2e testing with BentoML CLI in Yatai repo?

yetone commented 2 years ago

@parano Not related to yatai, it's due to this PR https://github.com/bentoml/BentoML/pull/2323, so I think the e2e test should be in this bentoml repo.