Closed phpmoli closed 6 years ago
Hm, so there a few things here.
As you diagnosed, there was a failure in credentials._refresh()
which calls _do_refresh_request
if there is no Storage object (the tasks.dat
file) is found. In this case, the access token is expired. For whatever reason the refresh request failed and perhaps the on-disk Storage file had unexpected contents written to it (or just marked as invalid) causing problems in future invocations. Unfortunately I think here you may need to do a reauth flow: delete the keys.txt
and tasks.dat
file wherever you put them (default $HOME/.tasky/
) and re-run tasky to generate a new access token. There's not much Tasky can do here I think because token management is handled entirely by the API client library. Just out of curiosity, what does your tasks.dat
file say? (Don't include the full contents here, I'm just wondering if there's any indication that the credentials are invalid or an error message).
I'm not sure where that "usage:" line is coming from, since of course --nocolor
and --list
are flags for Tasky. The auth code (the failure code path) tries to read a flag parsed by argparse and since the Tasky-specific flags haven't been parsed yet, it fails. I should move flag parsing earlier on which should address that. I wonder if you would've gotten a more reasonable error message if flag parsing hadn't failed. I will do that.
I'll open a separate request for a more machine-parseable output (pull requests encouraged!).
Pushed d03f9f67a7ab649c554b2d45d602512b6ab2cbe2
Thanks for the reply!
and perhaps the on-disk Storage file had unexpected contents written to it (or just marked as invalid) causing problems in future invocations [...] Just out of curiosity, what does your tasks.dat file say?
Yeah, i guessed that happened. I tried to reproduce the bug by editing /usr/local/lib/python2.7/dist-packages/oauth2client/client.py
line 782
, but did not succeed. I do not have the .dat
anymore, i will save, anonimize, reopen and attach next time this happens.
Hello @jrupac ,
I have a script which backs up my gtasks in the text form outputed by tasky (by the way: json or native unformatted output possible?) which runs every hour, and i have received these 2 emails from that script:
and then
every hour.
I think what happened is that the script could not get a new token from Google and after this it got into a state from which it can not recover from: it now needs manual re-authorization from the admin via logging in to the server and fixing this problem.
Could you please help me fixing this? Thank you!