From f7fbc9696a82e69092e9a17cd83a1f12d30d520c Mon Sep 17 00:00:00 2001 From: Ignacio Guillermo Martinez Date: Wed, 29 Jul 2020 18:44:14 +0200 Subject: [PATCH] Fix Python3 decode error Decoding to utf-8 worked for Python2 but is redundant for Python3 and is code-breaking --- .../v201809/advanced_operations/add_responsive_display_ad.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/adwords/v201809/advanced_operations/add_responsive_display_ad.py b/examples/adwords/v201809/advanced_operations/add_responsive_display_ad.py index e4e0002a..0bd49ab5 100755 --- a/examples/adwords/v201809/advanced_operations/add_responsive_display_ad.py +++ b/examples/adwords/v201809/advanced_operations/add_responsive_display_ad.py @@ -113,7 +113,7 @@ def _CreateImage(media_service, opener, url): The image that was successfully uploaded. """ # Note: The utf-8 decode is for 2to3 Python 3 compatibility. - image_data = opener.open(url).read().decode('utf-8') + image_data = opener.open(url).read() image = { 'type': 'IMAGE', 'data': image_data,