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

Suddenly "Bad Request" Error #57

Closed
Zackhardtoname opened this issue Jun 25, 2021 · 3 comments
Closed

Suddenly "Bad Request" Error #57

Zackhardtoname opened this issue Jun 25, 2021 · 3 comments

Comments

@Zackhardtoname
Copy link

My output on arch

➜  Downloads i3-agenda -c ~/Dropbox/else/WEB/.google_credentials.json -ttl 60
Traceback (most recent call last):
  File "/usr/bin/i3-agenda", line 33, in <module>
    sys.exit(load_entry_point('i3-agenda==1.5', 'console_scripts', 'i3-agenda')())
  File "/usr/lib/python3.9/site-packages/i3_agenda/__init__.py", line 132, in main
    service = connect(args.credentials)
  File "/usr/lib/python3.9/site-packages/i3_agenda/__init__.py", line 348, in connect
    creds.refresh(Request())
  File "/usr/lib/python3.9/site-packages/google/oauth2/credentials.py", line 208, in refresh
    access_token, refresh_token, expiry, grant_response = _client.refresh_grant(
  File "/usr/lib/python3.9/site-packages/google/oauth2/_client.py", line 248, in refresh_grant
    response_data = _token_endpoint_request(request, token_uri, body)
  File "/usr/lib/python3.9/site-packages/google/oauth2/_client.py", line 124, in _token_endpoint_request
    _handle_error_response(response_body)
  File "/usr/lib/python3.9/site-packages/google/oauth2/_client.py", line 60, in _handle_error_response
    raise exceptions.RefreshError(error_details, response_body)
google.auth.exceptions.RefreshError: ('invalid_grant: Bad Request', '{\n  "error": "invalid_grant",\n  "error_description": "Bad Request"\n}')

Not sure what happened... Thank you!

@rosenpin
Copy link
Owner

try to delete your i3agenda_google_token.pickle file
You should be able to find it in ~/.i3agenda/i3agenda_google_token.pickle

@Zackhardtoname
Copy link
Author

Yeah it worked!
(Although at first the text and background were white and red and left and right clicking didn't get rid of that, it was normal again after I restarted it with the -u flag.)

@rosenpin
Copy link
Owner

Great

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants