Oauth2 Authorization fails to work
I followed the instructions on this page ( http://gspread.readthedocs.org/en/latest/oauth2.html).
Inserted the following lines to connect to Oauth json_key = json.load(open('gspread-april-2cd … ba4.json')) scope = ['https://spreadsheets.google.com/feeds']
credentials = SignedJwtAssertionCredentials(json_key['client_email'], json_key['private_key'], scope) gc = gspread.authorize(credentials)
But the output was the following traceback error..... How could I fix this problem.
traceback (most recent call last):
File "code/upload_form6.py", line 625, in
@mosesmc52 check solution in #224
Using the solution in ticket #224, is there any alternative approach to submitting the Google credentials other than submitting through an environmental variable?
I would also like that - and the docs need updating!
@felagund this project is open for any kind of contributions :)
Yes, but I doubt the solution with enviromnet variable is a correct one, so I do not know how I could update the docs.
I mean, I consider that solution just a workaround and that whóle byte<>unicode python2/3 thing puzzles me too much to come up with a proper solution myself. Moreover, I have not even tried the workaround, I am kind of waiting for a "proper fix" to update my code, I expect the deprecated api to work for some time (my code still works).
@felagund I also don't like the solution with env vars. But at the moment I don't have any alternatives. Does your working code use ClientLogin?
@felagund I also don't like the solution with env vars. But at the
moment I don't have any alternatives. Your working code uses ClientLogin?
No, I just use gspread.login() using my password and e-mail in plaintext
in the source code, it still works.
@felagund, have you solved your issue?
Yeah, I did. I don't know about hte OP.
Cool. I'll close the issue and if it crops up again, OP can reopen it.
Thanks.