googleads-python-lib
googleads-python-lib copied to clipboard
"Can't pickle SSLContext objects" on requests
I'm running a tutorial-level script on a python:3.7-buster Docker instance (but I'm getting the same error running 3.7 on Windows 10).
oauth2_client = oauth2.GoogleServiceAccountClient("google_auth.json", oauth2.GetAPIScope('ad_manager'))
client = adwords.AdWordsClient(oauth2_client, "xxxx")
targeting_idea_service = client.GetService('TargetingIdeaService', version='v201809')
<insert selector dict building here>
more_pages = True
while more_pages:
page = targeting_idea_service.get(selector)
At the targeting_idea_server.get(selector) line is where the whole thing blows up with TypeError: can't pickle SSLContext objects. Initially, I read that the error was possibly caused by Python's multi-threading on Windows, so that's when I moved it into the Docker container and got the same result.
I've gone back a couple of versions and run into the same issue.
What am I doing wrong?
Hi @sp0rkie I believe this issue was resolved in a separate thread, please see: https://github.com/googleads/googleads-python-lib/issues/468