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
Here's the snipet from code (starting on line 36) that I can't figure out how to format:
try:
# Run the report and wait for it to finish.report_job_id=report_downloader.WaitForReport(report_job)
excepterrors.DfpReportError, e:
print'Failed to generate report. Error was: %s'%e# Change to your preferred export format.export_format='CSV_DUMP'
Is this a python version issue?
Thanks for the help!
The text was updated successfully, but these errors were encountered:
At line 57, change except errors.DfpReportError, e: to except errors.DfpReportErrorase:
Make sure at line 57 - except errors.DfpReportError as e: stays under Try on line 54. Atom editor auto-adjusted the indention incorrectly so I had to move it back.
All Print 'string' needs to be changed to Print('string')
At line 39, change .WithBindVariable('id', long(saved_query_id)) to .WithBindVariable('id', int(saved_query_id))
Whala- everything ran after that. I know it has to do with the Python version (2 vs 3) but I am not familiar with how to work around the version changes. I'm sure there's some lib for that. I guess I'll figure that out eventually. Hope this helps!
I get the following syntax error on line 39 of run_saved_query.py:
Here's the snipet from code (starting on line 36) that I can't figure out how to format:
Is this a python version issue?
Thanks for the help!
The text was updated successfully, but these errors were encountered: