Thanks for that very helpful reply. I installed the googleads library via yesterday using: pip install googleads
That installed all the dependencies at that time. If I do: pip install httplib2 --upgrade It returns: Requirement already up-to-date: httplib2 in c:\python34\lib\site-packages The last thing I wanted to do was uninstall Python and reinstall it since I have many packages that I found difficult to install initially (pandas, numpy, etc.) on Windows. The solution that worked was to go to the *__init__.py* file located at *C:\Python34\Lib\site-packages\httplib2* and change this line: check_hostname=True) to this: check_hostname=disable_ssl_certificate_validation ^ True) And everything now works. I am able to download reports. Thank you for your response Michael. On Tuesday, June 30, 2015 at 10:31:43 AM UTC-7, Michael Cloonan (AdWords API Team) wrote: > > Hello, > > I just checked with the maintainer of the Python library, and here's what > he had to say: "I do see this issue pop up every so often for users who > install the library for the first time. A clean install usually fixes it. I > suspect they are picking up an old version of the httplib2 library somehow." > > He also linked to this related issue: > https://github.com/googleads/googleads-python-lib/issues/53 > > So it seems that the recommendation is to do a clean install, or else to > make the modification mentioned in the related issue. It comes down to > having an old version of the httplib2. > > Regards, > Mike, AdWords API Team > > On Tuesday, June 30, 2015 at 10:49:48 AM UTC-4, Jarad Collier wrote: >> >> 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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com 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 adwords-api+unsubscr...@googlegroups.com. 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/e614f2f5-be9c-48c1-8ec3-1d4f184872c1%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.