I am using Python 3.4.2.  I am attempting to run Adwords API Python 3 
examples 
<https://github.com/googleads/googleads-python-lib/tree/master/examples/adwords/v201502/reporting>:
 
adwords_python3_examples_3.4.1\v201502\reporting\download_criteria_report_as_string.py

I have set up my googleads.yaml file 
here: C:\Users\Owner\googleads.yaml (because it seems to look for it there).

I'm simply trying to fetch an example report (my first one ever) from the 
API but am running into the below error:

DEBUG:suds.transport.http:opening 
(https://adwords.google.com/api/adwords/reportdownload/v201409/reportDefinition.xsd)
DEBUG:suds.transport.http:opening 
(https://adwords.google.com/api/adwords/reportdownload/v201409/reportDefinition.xsd)
INFO:oauth2client.client:Refreshing access_token
Traceback (most recent call last):
  File 
"C:\Users\Owner\Downloads\adwords_python3_examples_3.4.1\v201409\reporting\download_criteria_report_as_string.py",
 
line 64, in <module>
    main(adwords_client)
  File 
"C:\Users\Owner\Downloads\adwords_python3_examples_3.4.1\v201409\reporting\download_criteria_report_as_string.py",
 
line 59, in main
    print(report_downloader.DownloadReportAsString(report))
  File "C:\Python34\lib\site-packages\googleads\adwords.py", line 588, in 
DownloadReportAsString
    skip_report_header, skip_column_header, skip_report_summary)
  File "C:\Python34\lib\site-packages\googleads\adwords.py", line 754, in 
_DownloadReportAsStream
    skip_report_summary))
  File "C:\Python34\lib\site-packages\googleads\adwords.py", line 356, in 
GetReportDownloadHeaders
    headers = self._adwords_client.oauth2_client.CreateHttpHeader()
  File "C:\Python34\lib\site-packages\googleads\oauth2.py", line 150, in 
CreateHttpHeader
    self.Refresh()
  File "C:\Python34\lib\site-packages\googleads\oauth2.py", line 166, in 
Refresh
    self.disable_ssl_certificate_validation)))
  File "C:\Python34\lib\site-packages\oauth2client\client.py", line 598, in 
refresh
    self._refresh(http.request)
  File "C:\Python34\lib\site-packages\oauth2client\client.py", line 769, in 
_refresh
    self._do_refresh_request(http_request)
  File "C:\Python34\lib\site-packages\oauth2client\client.py", line 800, in 
_do_refresh_request
    self.token_uri, method='POST', body=body, headers=headers)
  File "C:\Python34\lib\site-packages\httplib2\__init__.py", line 1195, in 
request
    self.disable_ssl_certificate_validation)
  File "C:\Python34\lib\site-packages\httplib2\__init__.py", line 850, in 
__init__
    check_hostname=True)
  File "C:\Python34\lib\http\client.py", line 1211, in __init__
    raise ValueError("check_hostname needs a SSL context with "
ValueError: check_hostname needs a SSL context with either CERT_OPTIONAL or 
CERT_REQUIRED

I saw this post: Issue 173 regarding httplib2 
<https://code.google.com/p/httplib2/issues/detail?id=173> .  I don't want 
to blindly change something I have no context to or know the ramifications 
down the line.

1. My first question is, based on the message above, does it look like my 
credentials in my yaml file are working? I've never seen what a successful 
request looks like.

2. What is the most logical way to fix the above ValueError?  What is the 
primary issue?  Is the best solution to dig around in the httplib2 file and 
change this line?
check_hostname= disable_ssl_certificate_validation ^ True

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at http://groups.google.com/group/adwords-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/9df4a5a4-df0f-41fe-a626-37a3803cbf8f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to