我正在使用 201306,直到星期五我都可以正常下载报告。但是今天突然开始出现以下错误。
Invalid ReportDefinition Xml: cvc-complex-type.2.4.a: Invalid content was found starting with element 'operator'
我的代码片段:
selector.fields = new[]
{
PerformanceSelector.Date,
PerformanceSelector.KeywordId,
PerformanceSelector.KeywordText,
PerformanceSelector.AccountName,
PerformanceSelector.CampaignId,
PerformanceSelector.CampaignName,
PerformanceSelector.AdGroupId,
PerformanceSelector.AdGroupName,
PerformanceSelector.KeywordMatchType,
PerformanceSelector.Impressions,
PerformanceSelector.Clicks,
PerformanceSelector.AveragePosition,
PerformanceSelector.Cost,
PerformanceSelector.AverageCpc,
PerformanceSelector.ClickThroughRate,
PerformanceSelector.Conversions,
PerformanceSelector.ConversionRate,
PerformanceSelector.CostPerConversion,
};
dates = new DateRange { min = String.Format("{0:yyyyMMdd}", StartDate), max = String.Format("{0:yyyyMMdd}", EndDate) };
selector.dateRange = dates;
报告定义
var reportDefinition = new ReportDefinition
{
reportName = ReportName,
reportType = ReportType,
dateRangeType = ReportDefinitionDateRangeType.CUSTOM_DATE,
includeZeroImpressions = true,
downloadFormat = DownloadFormat.XML,
selector = selector
};
我得到的错误是
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><reportDownloadError><ApiError><type>ReportDownloadError.INVALID_REPORT_DEFINITION_XML</type><trigger>Invalid ReportDefinition Xml: cvc-complex-type.2.4.a: Invalid content was found starting with element 'operator'. One of '{"https://adwords.google.com/api/adwords/cm/v201306":field}' is expected.</trigger><fieldPath></fieldPath></ApiError></reportDownloadError>