Invalid ReportDefinition Xml: cvc-complex-type.2.4.a: Invalid content was found starting with the 'operator' element

I am using 201306, and until Friday I was able to download reports normally. But today, unexpectedly, the following error appeared.

Invalid ReportDefinition Xml: cvc-complex-type.2.4.a: Invalid content was found starting with element 'operator'

My code snippet:

 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;

ReportDefiniton

    var reportDefinition = new ReportDefinition
        {
            reportName = ReportName,
            reportType = ReportType,
            dateRangeType = ReportDefinitionDateRangeType.CUSTOM_DATE,
            includeZeroImpressions = true,
            downloadFormat = DownloadFormat.XML,
            selector = selector
        };

And the error I get is

<?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 '{&quot;https://adwords.google.com/api/adwords/cm/v201306&quot;:field}' is expected.</trigger><fieldPath></fieldPath></ApiError></reportDownloadError>
+4
source share
1 answer

I also had this problem, but I forgot to change the version:

var utilities = new ReportUtilities (user); utilities.ReportVersion = "v201309";

Still was v201302

Hope this helps.

StΓ©phane

+3
source

All Articles