GET Time_Increment Broken
Hi,
Trying to pull some insights off the ads api, broken down on a daily level. Whenever I specify the time_range parameter, I'll get a status 500 response with error subcode 99. Not sure what this means or how to rectify it.
`Traceback (most recent call last):
File "main.py", line 107, in
Message: Call was not successful Method: GET Path: https://graph.facebook.com/v2.11/act_1430511713688677/insights Params: {'time_range': '{"since":"2018-01-30","until":"2018-01-31"}', 'fields': '["account_id","account_name","ad_id","ad_name","actions","campaign_id","campaign_name","reach","impressions","inline_post_engagement","clicks","cpc","ctr","cpm","cost_per_inline_post_engagement","cost_per_10_sec_video_view","cost_per_total_action","place_page_name"]', 'breakdowns': '["publisher_platform","platform_position"]', 'time_increment': 1, 'level': 'ad'}
Status: 500 Response: { "error": { "message": "An unknown error occurred", "code": 1, "error_subcode": 99 } }`
params = {
'level': 'ad',
'fields': ['account_id',
'account_name',
'ad_id',
'ad_name',
'actions',
'campaign_id',
'campaign_name',
'reach',
'impressions',
'inline_post_engagement',
'clicks',
'cpc',
'ctr',
'cpm',
'cost_per_inline_post_engagement',
'cost_per_10_sec_video_view',
'cost_per_total_action',
'place_page_name'],
'breakdowns':['publisher_platform', 'platform_position'],
'time_increment':1,
'time_range': {'since': '2018-01-30','until': '2018-01-31'}
}
I am receiving exactly the same error if i try to pull some insights off the facebook ads api since 27th of Feb 2018. The same code was working absolutely fine before 27th of Feb 2018. The error status is 500 and after a bit of research i got to know that its the server side error which I am quite not sure of. Below you can see the log of the error which i am getting.
Facebook logging:
API bootstrap successfull.
Accounts loaded successfully.
<class 'facebookads.exceptions.FacebookRequestError'>
Message: Call was not successful
Method: GET
Path: https://graph.facebook.com/v2.10/act_1459815497630046/insights
Params: {'fields': 'account_name,campaign_name,adset_name,ad_name,spend', 'breakdowns': '["region"]', 'level': 'ad', 'time_increment': 1, 'time_range': '{"since":"2018-02-27","until":"2018-03-16"}'}
Status: 500
Response:
{
"error": {
"message": "An unknown error occurred",
"code": 1,
"error_subcode": 99
}
}'
If somebody knows how to solve this issue please do let us know.
I getting the same issue here as well, I believe all fields mentioned can be grabbed at all levels {ad, adset, campaign, account }. Just making sure level isnt a problem here.
The problem is a timeout, but I don't know why the response is error 500. I have the same problem when I'm trying to pull data on ad level.
It seems like this issue has been open for more than a few months now. We have made many changes in the SDK since then, including releasing a new version. If you can repro your specific issue with the latest version of the SDK, please create a new issue or comment here with further details.
Got same error on version '3.1.1'.
Using Python client, facebook_business got:
Message: Call was not successful
Method: GET
Path: https://graph.facebook.com/v3.1/act_1421944777889456/campaigns
Params: {'fields': 'name,id,account_id,spend_cap,objective,start_time,stop_time,status', 'encoding': 'iso-8859-1', 'summary': 'true'}
Status: 500
Response:
{
"error": {
"message": "An unknown error occurred",
"code": 1,
"error_subcode": 99
}
}
Hey, thanks for your comment! This is actually an api issue. Please report the issue on Devsite Bug Report channel: https://developers.facebook.com/support/bugs/ Thanks!