Request contains an invalid argument using add_offline_user_data_job_operations method from google ads python package

165 views
Skip to first unread message

Edgar Leroux

unread,
Dec 26, 2022, 5:19:09 AM12/26/22
to Google Ads API and AdWords API Forum
Hello,

When I try to use the add_offline_user_data_job_operations method from google ads python package i get the following error even tho I upgraded the version to "v12" and the package google-ads to its latest version :

  File "/hexagonal_job_template/hexagon/application/application_framework.py", line 112, in execute_application

    self.application.execute(target_provider)

  File "/hexagonal_job_template/hexagon/context.py", line 187, in wrapper

    return fn(*args, **kwargs)

  File "/hexagonal_job_template/hexagon/application/custom/gads_remarketing.py", line 30, in execute

    service.upload_data(query_name)

  File "/hexagonal_job_template/hexagon/infra/gads_connector.py", line 592, in upload_data

    self.insert_data_list(resource_name, hashed_email_list)

  File "/hexagonal_job_template/hexagon/infra/gads_connector.py", line 501, in insert_data_list

    offline_user_data_job_service_client.add_offline_user_data_job_operations(

  File "/usr/local/lib/python3.9/site-packages/google/ads/googleads/v12/services/services/offline_user_data_job_service/client.py", line 591, in add_offline_user_data_job_operations

    response = rpc(

  File "/usr/local/lib/python3.9/site-packages/google/api_core/gapic_v1/method.py", line 154, in __call__

    return wrapped_func(*args, **kwargs)

  File "/usr/local/lib/python3.9/site-packages/google/api_core/grpc_helpers.py", line 72, in error_remapped_callable

    return callable_(*args, **kwargs)

  File "/usr/local/lib/python3.9/site-packages/grpc/_interceptor.py", line 247, in __call__

    response, ignored_call = self._with_call(request,

  File "/usr/local/lib/python3.9/site-packages/grpc/_interceptor.py", line 290, in _with_call

    return call.result(), call

  File "/usr/local/lib/python3.9/site-packages/grpc/_interceptor.py", line 146, in result

    raise self._exception

  File "/usr/local/lib/python3.9/site-packages/grpc/_interceptor.py", line 274, in continuation

    response, call = self._thunk(new_method).with_call(

  File "/usr/local/lib/python3.9/site-packages/grpc/_interceptor.py", line 301, in with_call

    return self._with_call(request,

  File "/usr/local/lib/python3.9/site-packages/grpc/_interceptor.py", line 290, in _with_call

    return call.result(), call

  File "/usr/local/lib/python3.9/site-packages/grpc/_interceptor.py", line 146, in result

    raise self._exception

  File "/usr/local/lib/python3.9/site-packages/grpc/_interceptor.py", line 274, in continuation

    response, call = self._thunk(new_method).with_call(

  File "/usr/local/lib/python3.9/site-packages/grpc/_interceptor.py", line 301, in with_call

    return self._with_call(request,

  File "/usr/local/lib/python3.9/site-packages/grpc/_interceptor.py", line 287, in _with_call

    call = self._interceptor.intercept_unary_unary(continuation,

  File "/usr/local/lib/python3.9/site-packages/google/ads/googleads/interceptors/exception_interceptor.py", line 99, in intercept_unary_unary

    self._handle_grpc_failure(response)

  File "/usr/local/lib/python3.9/site-packages/google/ads/googleads/interceptors/exception_interceptor.py", line 71, in _handle_grpc_failure

    raise self._get_error_from_response(response)

google.ads.googleads.errors.GoogleAdsException: (<_InactiveRpcError of RPC that terminated with:

   status = StatusCode.INVALID_ARGUMENT

   details = "Request contains an invalid argument."

   debug_error_string = "UNKNOWN:Error received from peer ipv4:142.250.178.138:443 {created_time:"2022-12-26T10:04:24.807792876+00:00", grpc_status:3, grpc_message:"Request contains an invalid argument."}"

>, <_InactiveRpcError of RPC that terminated with:

   status = StatusCode.INVALID_ARGUMENT

   details = "Request contains an invalid argument."

   debug_error_string = "UNKNOWN:Error received from peer ipv4:142.250.178.138:443 {created_time:"2022-12-26T10:04:24.807792876+00:00", grpc_status:3, grpc_message:"Request contains an invalid argument."}"

>, errors {

  error_code {

    request_error: UNKNOWN

  }

  message: "The error code is not in this version."

}

request_id: "PPRxsFZDJhK_Q4WUrkAtLA"

, 'PPRxsFZDJhK_Q4WUrkAtLA')


 Thanks for your help !

Google Ads API Forum Advisor

unread,
Dec 27, 2022, 4:35:59 AM12/27/22
to edgar....@papernest.com, adwor...@googlegroups.com

Hi Edgar, 

Thanks for reaching out to the Google Ads API Forum.

With regards to your concern of having an error message: "The error code is not in this version.”  for our team to further check and validate the issues, could you provide us with the updated complete API logs (request and response with request-id) generated on your end? Note that this can be requested or provided to the developer handling the Google Ads API transactions when logging of the API requests has been enabled. You may check here and click your client library for the specific guideline to enable it.

Please see Python logging guidelines for more information.

You may then send the requested information via the Reply privately to the author option. If this option is not available, you may send the details directly to our googleadsa...@google.com alias instead.

Regards,

Google Logo
Marjorie
Google Ads API Team
 


ref:_00D1U1174p._5004Q2hNrAf:ref
Reply all
Reply to author
Forward
0 new messages