BingAds / BingAds-Python-SDK

Other
117 stars 162 forks source link

Server responds with error code 500 for what looks like a valid request. #138

Closed RoyBellingan closed 4 years ago

RoyBellingan commented 4 years ago

A request like https://gist.github.com/RoyBellingan/28eab4d5912b336ce11737f7e32fcd4e Is having as response just a 'Internal Server Error' with error code 500 Just a few second before I tried successfully another request, that looks almost the same (but of course for a different report) like https://gist.github.com/RoyBellingan/1842acc042b62b228596310b378cff3b

The code to generate them is the same, only difference is of course the request type and a change in the namespace order

RoyBellingan commented 4 years ago

Also this request fails https://gist.github.com/RoyBellingan/d69ff1b5fe9679fb4b01d4f65b3d17a2 Here the namespace order is the same.

RoyBellingan commented 4 years ago

Additional note I was having also an error doing https://docs.microsoft.com/en-us/advertising/reporting-service/userlocationperformancereportcolumn?view=bingads-13 And selecting ONLY those column

            ,'AdGroupId'
            ,'TimePeriod'
            , 'MetroArea'
            , 'Impressions'
            , 'Clicks'

By doc TimePeriod alone is enought, but looks like also AccountName is needed, and now is working!

SO the error in this case is not in this SDK but on the server than handle the data, please return a better error description than "Internal Error 500"

I will try a similar approach on the other report.

RoyBellingan commented 4 years ago

Same thing is happening also in other reports, so when the doc says The report must include at least one of the following attribute columns ... well is wrong, please update the doc.

eric-urban commented 4 years ago

@RoyBellingan the documentation is updated: "The report must include the following columns. As a general rule, each report must include at least one non-impression share attribute column and at least one performance statistics column." Thanks for your patience!