Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Can't login with a different account after overwriting the config #49

Closed
pallabpain opened this issue Sep 29, 2022 · 1 comment · Fixed by #53
Closed

[Bug] Can't login with a different account after overwriting the config #49

pallabpain opened this issue Sep 29, 2022 · 1 comment · Fixed by #53
Assignees
Labels
🐛 bug Something isn't working
Milestone

Comments

@pallabpain
Copy link
Contributor

pallabpain commented Sep 29, 2022

[itaru-ThinkPad-T14s-Gen-2i][if_apply] apply$ rio auth login
Email: itaru.fujiwara@rapyuta.io
Password:
[Warning] rio already has a config file present
Do you want to override the config [y/N]: y
Traceback (most recent call last):
  File "/home/itaru/.local/bin/rio", line 8, in <module>
    sys.exit(cli())
  File "/home/itaru/.local/lib/python3.8/site-packages/click/core.py", line 1137, in __call__
    return self.main(*args, **kwargs)
  File "/home/itaru/.local/lib/python3.8/site-packages/click/core.py", line 1062, in main
    rv = self.invoke(ctx)
  File "/home/itaru/.local/lib/python3.8/site-packages/click/core.py", line 1668, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/itaru/.local/lib/python3.8/site-packages/click/core.py", line 1668, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/itaru/.local/lib/python3.8/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/itaru/.local/lib/python3.8/site-packages/click/core.py", line 763, in invoke
    return __callback(*args, **kwargs)
  File "/home/itaru/.local/lib/python3.8/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/itaru/.local/lib/python3.8/site-packages/riocli/auth/login.py", line 68, in login
    select_project(ctx.obj, project=project)
  File "/home/itaru/.local/lib/python3.8/site-packages/riocli/auth/util.py", line 37, in select_project
    projects = client.list_projects()
  File "/home/itaru/.local/lib/python3.8/site-packages/rapyuta_io/rio_client.py", line 1372, in list_projects
    return self._core_api_client.list_projects()
  File "/home/itaru/.local/lib/python3.8/site-packages/rapyuta_io/clients/core_api_client.py", line 120, in list_projects
    data = get_api_response_data(response, parse_full=True)
  File "/home/itaru/.local/lib/python3.8/site-packages/rapyuta_io/utils/utils.py", line 81, in get_api_response_data
    raise common_errors[status_code](get_error(response.text))
rapyuta_io.utils.error.UnauthorizedError: user does not exist in project's organization

Slack thread for reference: https://rapyuta-robotics.slack.com/archives/CBAP39MGD/p1664422026253069

┆Issue is synchronized with this Wrike task

@pallabpain pallabpain added the 🐛 bug Something isn't working label Sep 29, 2022
@pallabpain pallabpain added this to the v0.5.0 milestone Sep 29, 2022
ankitrgadiya added a commit that referenced this issue Oct 4, 2022
…m config

When `new_client` function was called with `with_project=False`, it
could still read project_id from the config file. So, if first user is
part of a Project but second user (second login) is not, it can raise an
exception.

This issue is fixed in this commit.

Resolves #49
ankitrgadiya added a commit that referenced this issue Oct 13, 2022
…m config

When `new_client` function was called with `with_project=False`, it
could still read project_id from the config file. So, if first user is
part of a Project but second user (second login) is not, it can raise an
exception.

This issue is fixed in this commit.

Resolves #49
@ankitrgadiya
Copy link
Member

Resolved in #53

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
3 participants