xdevplatform / twitter-python-ads-sdk

A Twitter supported and maintained Ads API SDK for Python.
https://twitterdev.github.io/twitter-python-ads-sdk/
MIT License
189 stars 106 forks source link

Critical issue with Twitter Ads SDK Version 5.3.0 #221

Closed shaun10 closed 5 years ago

shaun10 commented 5 years ago

2019-08-21 08:41:55,150 - process_twitter_ads_api - ERROR - 'Analytics' object has no attribute '__getitem__' Traceback (most recent call last): File "process_twitter_ads_api/main.py", line 465, in <module> main(DATE_LIST) File "process_twitter_ads_api/main.py", line 434, in main run_date, segmentation_name, segmentation_type File "process_twitter_ads_api/main.py", line 185, in produce_analytics_data LOGGER.info('async_stats_job (url): {}'.format(async_stats_job_result['url'])) TypeError: 'Analytics' object has no attribute '__getitem__' Traceback (most recent call last): File "process_twitter_ads_api/main.py", line 465, in <module> main(DATE_LIST) File "process_twitter_ads_api/main.py", line 434, in main run_date, segmentation_name, segmentation_type File "process_twitter_ads_api/main.py", line 185, in produce_analytics_data LOGGER.info('async_stats_job (url): {}'.format(async_stats_job_result['url'])) TypeError: 'Analytics' object has no attribute '__getitem__'

Issue did not occur in SDK version 5.2.0

shaun10 commented 5 years ago

PR #211 seems to be connected.

smaeda-ks commented 5 years ago

Hi @shaun10

Sorry, I forgot to include the change in the release note but yes, you need to change async_stats_job_result['url'] to async_stats_job_result.url.

I'll update the release note.

smaeda-ks commented 5 years ago

@shaun10 The release note has been updated to include this breaking change. https://github.com/twitterdev/twitter-python-ads-sdk/releases

I'm closing this issue but let me know if you have other questions regarding this. Thanks for flagging this.