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
We’ve been using the same pattern of accessing AdWords batch service as this example. However, since about 10 days ago after we upgraded our python googleads library to 12.2.0 from 9.0.0, we started to receive intermittent issues with these two lines.
The error message quoted below seems to indicate the batch_job[‘downloadUrl’] object is null even if the “downloadUrl” key is present in the batch_job object.
url = batch_job['downloadUrl']['url']
TypeError: 'NoneType' object has no attribute '__getitem__'
Retry the script usually eventually fixes this issue, but every day we got some jobs failing too many times even after retrying and people getting the alert messages have to manually retry the jobs. We looked up the releasing notes from version 10.0.0 but couldn’t find anything related.
Can you check what is causing this issue and what should be the best practice for us moving forward?
We run multiple accounts, and the batch operation succeeded on some, and threw the error above on others.
One change we made was to explicitly look for a 'DONE' batch job status, rather than relying only on the presence of the 'downloadUrl' property. It's hard to tell if that solved the problem, or if simply retrying it avoided the failure.
Activity
msaniscalchi commentedon Jul 18, 2018
Hello,
Thanks for the report! Some additional context may be helpful:
Regards,
Mark
sliu-walmart commentedon Jul 18, 2018
@msaniscalchi Thanks for looking into this. Please see below for my responses.
ravichandrasekaran commentedon Dec 30, 2018
We just starting seeing a very similar error on upgrading from API version v201802 to v201809 and upgrading our Python package from 10.0.1 to 15.0.1.
One change we made was to explicitly look for a 'DONE' batch job status, rather than relying only on the presence of the 'downloadUrl' property. It's hard to tell if that solved the problem, or if simply retrying it avoided the failure.
googleads-python-lib/examples/adwords/v201809/campaign_management/add_keywords_using_incremental_batch_job.py
Line 221 in fe86335
Confirm batch_job status is 'DONE'
christopherseeley commentedon Mar 25, 2024
The AdWords API has been turned down and replaced by the Google Ads API:
https://github.com/googleads/google-ads-python