rosenpin / i3-agenda

Show your next google calendar event in polybar, swiftbar, i3-bar, simple-bar, bitbar or any other bar with custom scripts support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Suddenly "Bad Request" Error

Zackhardtoname opened this issue · comments

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!

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

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.)