You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in adwords.py the method _DownloadReportCheckFormat was recently changed. The new test for is_binary_mode is probably incorrect:
def _DownloadReportCheckFormat(self, file_format, output):
is_binary_mode = getattr(output, 'mode', 'w') == 'wb'
if (file_format.startswith('GZIPPED_')
and not (is_binary_mode or type(output) is io.BytesIO)):
raise googleads.errors.GoogleAdsValueError('Need to specify a binary'
' output for GZIPPED formats.')
This will incorrectly raise an exception for some valid binary mode combinations (e.g r+b, w+b).
The text was updated successfully, but these errors were encountered:
Thanks for the report! It looks like this changed back in July. I don't think we expected the use-case to simultaneously read and write from the downloaded report file during an earlier refactoring, so the logic was simplified to what you see above. That said, I don't see a need for us to restrict this usage, so I think it makes sense to go back and update this. It probably won't make it into the update today, but we'll get around to it soon.
in adwords.py the method _DownloadReportCheckFormat was recently changed. The new test for is_binary_mode is probably incorrect:
This will incorrectly raise an exception for some valid binary mode combinations (e.g r+b, w+b).
The text was updated successfully, but these errors were encountered: