Closed nskybytskyi closed 6 years ago
I am trying to get insights about a specific ad campaign on specific date broken down by country. My code is as follows:
_fields=['impressions', 'spend'] _params={'breakdowns':'country', 'time_range': {'since': '2018-07-15', 'until': '2018-07-15'}} campaign.get_insights(fileds=_fields, params=_params)
I get the following error:
UserWarning: value of breakdowns might not be compatible. Expect list<breakdowns_enum>; got <class 'str'>
Is there anything I am doing wrong, or is it a mistake in sdk?
The error said that breakdowns parameters must be a list. Try changing 'breakdowns': 'country' to 'breakdowns': ['country']
breakdowns
'breakdowns': 'country'
'breakdowns': ['country']
close it since @ntnam11 provide a correct way to fix it.
I am trying to get insights about a specific ad campaign on specific date broken down by country. My code is as follows:
I get the following error:
Is there anything I am doing wrong, or is it a mistake in sdk?