I'm trying to do a pure server side authentication. I've followed all the procedures mentioned in the code sample provided on google developers. The problem is that
execfile()
works fine in the normal python shell
but it throws the below mentioned error in the python interactive shell
.Following is the log for the statements. What else needs to be defined in the
playlistitems.py
file so that it can be executed in the Python Interactive Shell.Code for
playlistitems.py
: Sample CodeI passed the arguments by changing the values in the
tools.py
itself. Following is the error that I got. How do I solve it? And end to end example for this case?Sorry for being late on this everyone. You’ve probably already heard of it but Amaterasu has released the 2nd partial patch for Comyu.This patch covers a lot more story than the previous Benio patch release, translating the common route as well as Benio, Hisoka, Mayuki and Ayaya’s routes. Aug 29, 2012 Nonetheless, I tried modifying my kernel settings with acpi=off and acpi=noirq. Still nothing. Similarly, I no longer seem to be able to use my wifi card(RTL8188, has been working previously) and I have not confirmed it but I believe my ethernet adapter is also not being loaded.
Kshitij
KshitijKshitij
3 Answers
I finally got the working code with some help from @Stormie. So here is the working code snippet.
I got to know about
parse_args()
just now. parse_args() method of ArgumentParser is needed to be passed the parameters.If you are authenticating from the command line and your browser doesn't support Javascript, you may want to add the argument --noauth_local_webserver:
KshitijKshitij
This worked for mefrom oauth2client import toolsflags = tools.argparser.parse_args([])This prompted me to authentication url in browser.Hope this helps
Mohammad Ibrahim KhanMohammad Ibrahim Khan
You need to pass through arguments for your
run_flow()
method from the OAuth2Client tools
. It shows that when you call run_flow()
you must parse the following arguments:The flags are what you are missing, you must add the flags (described in the link):
I still haven't cracked how exactly to parse them unfortunately, I currently have a bountied question regarding how to emulate the old
run()
method of authenticating your session here.LeonHLeonH