I am trying to upload video to youtube with usage of this example. Here is the authorization code:
def get_authenticated_service(args): flow = flow_from_clientsecrets(CLIENT_SECRETS_FILE, scope=YOUTUBE_UPLOAD_SCOPE, message=MISSING_CLIENT_SECRETS_MESSAGE) storage = Storage("%s-oauth2.json" % sys.argv[0]) credentials = storage.get() if credentials is None or credentials.invalid: credentials = run_flow(flow, storage, args) return build(YOUTUBE_API_SERVICE_NAME, YOUTUBE_API_VERSION, http=credentials.authorize(httplib2.Http()))The code worked previously. Now when I input the verification code, then nothing happens - no errors, just the console is waiting for something. I don't understand how to debug it further, since no errors are displayed.
If I press Ctrl+C, then the error with SSL is displayed:
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ssl.py", line 828, in do_handshake self._sslobj.do_handshake()I run my python script with --noauth_local_webserver, it returns the link like
https://accounts.google.com/o/oauth2/auth?scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fyoutube&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob&response_type=code&client_id=<id>.apps.googleusercontent.com&access_type=offlineThere are no any error with authorization at the browser (application mode is changed to Testing to get offline code).
Upd. I've added socket.setdefaulttimeout(10) to my code and now it returns ssl.SSLError: ('_ssl.c:711: The handshake operation timed out',).