0

グーグルアドワーズAPIサービスについて質問があります:BulkMutateJob。

さまざまなグループのアドワーズ広告をたくさん更新しようとしています。ジョブを作成すると、正常に実行され、ステータスが「COMPLETED」になりますが、このジョブのパーツの結果を取得して、エラーが発生します。

inner_fault: !ruby/exception:SOAP::FaultError 
message: "[RangeError.TOO_HIGH @ selector.resultPartIndex]"

コードは次のとおりです。

if status == 'COMPLETED' and error == false
  puts 'Job completed!'
  # Retrieve the results for the parts.
  0.upto(parts) do |part_index|
    selector = bulk_mutate_job_srv.module::BulkMutateJobSelector.new
    selector.jobIds = [job_id]
    # Retrieve results for the first part.
    selector.resultPartIndex = part_index
    results = bulk_mutate_job_srv.get(selector)
    if results and results.entries
      results.each do |result|
        puts 'Part %d/%d of job #%d has successfully completed' %
        [part_index + 1, job[:parts], job_id]
      end
    else
      raise 'Error retrieving job results; aborting.'
    end
  end
else
  puts "Job failed: #{get_response.entries[0].failureReason}"
end
4

1 に答える 1

0

このエラーは、resultPartIndex に負の数を渡していることを示していると思います。参考までに、公式の AdWords API フォーラムはこちらです: http://code.google.com/apis/adwords/forum.html

于 2011-06-03T14:44:58.023 に答える