Giter Site home page Giter Site logo

get_all_disapproved_ads.py: "google.api_core.exceptions.InternalServerError: 500 Internal error encountered" about google-ads-python HOT 11 CLOSED

googleads avatar googleads commented on June 21, 2024
get_all_disapproved_ads.py: "google.api_core.exceptions.InternalServerError: 500 Internal error encountered"

from google-ads-python.

Comments (11)

BenRKarl avatar BenRKarl commented on June 21, 2024

Hi @mbaader thanks you for submitting this issue! This is a known bug in the API that's being worked on currently. The hope is a solution will be released soon, but I can't say for sure exactly when. I'm going pin this issue for reference in case other users run into the same problem, and will follow up on it once the bugfix is released.

from google-ads-python.

minguezalba avatar minguezalba commented on June 21, 2024

Hi there,

Since this morning I am getting the same error when calling method: /google.ads.googleads.v1.services.CustomerClientLinkService/MutateCustomerClientLink

Here the request to generate a link with CustomerClientLinkService:

    link_service = manager_gads_client.get_service('CustomerClientLinkService', version='v1')
    status = manager_gads_client.get_type('ManagerLinkStatusEnum', version='v1')
    operation_create = manager_gads_client.get_type('CustomerClientLinkOperation', version='v1')

    link_create = operation_create.create
    link_create.client_customer.value = account_resource_name
    link_create.status = status.PENDING  # To send invitation must be PENDING

    try:
        mutate_link_response = link_service.mutate_customer_client_link(manager_id, operation_create)
    except ValueError:
        raise

Here the details of the exception:

grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with:

	status = StatusCode.INTERNAL
	details = "Internal error encountered."
	debug_error_string = "{"created":"@1554280012.041452270",
                               "description":"Error received from peer", 
                               "file":"src/core/lib/surface/call.cc", 
                               "file_line":1039,
                               "grpc_message": "Internal error encountered.",
                               "grpc_status":13}"

Are we talking about the same bug @BenRKarl mentioned? Any news about it?

Thank you very much!

Alba

from google-ads-python.

BenRKarl avatar BenRKarl commented on June 21, 2024

Hi @minguezalba that appears to be a separate issue, would you mind filing a new Issue for it? And if you could share more of the logged response that would be very helpful.

from google-ads-python.

BenRKarl avatar BenRKarl commented on June 21, 2024

@mbaader A bugfix for this issue was submitted and should resolve your problem querying for ad_group_ad.policy_summary. Can you try your script again to confirm?

from google-ads-python.

mbaader avatar mbaader commented on June 21, 2024

Hi @BenRKarl ,

sadly I keep getting the same error:

`Request: {
"query": "SELECT ad_group_ad.ad.id, ad_group_ad.ad.type, ad_group_ad.policy_summary FROM ad_group_ad WHERE campaign.id = 1234567890",
"customerId": "1234567890",
"pageSize": 1000
}

Response

Headers: {
"request-id": "2zSpiQf41AuRy7TomhZVHg"
}
Fault: {
"created": "@1554355800.935678608",
"description": "Error received from peer",
"file": "src/core/lib/surface/call.cc",
"file_line": 1039,
"grpc_message": "Internal error encountered.",
"grpc_status": 13
}

[2019-04-04 07:30:00,936 - WARNING] Request made: ClientCustomerId: 1234567890, Host: googleads.googleapis.com:443, Method: /google.ads.googleads.v1.services.GoogleAdsService/Search, RequestId: None, IsFault: True, FaultMessage: Internal error encountered.
Traceback (most recent call last):
File "google_ads_check_single_customer.py", line 106, in
_DEFAULT_PAGE_SIZE)
File "google_ads_check_single_customer.py", line 48, in main
for row in results:
File "/usr/local/lib/python2.7/site-packages/google/api_core/page_iterator.py", line 204, in _items_iter
for page in self._page_iter(increment=False):
File "/usr/local/lib/python2.7/site-packages/google/api_core/page_iterator.py", line 235, in _page_iter
page = self._next_page()
File "/usr/local/lib/python2.7/site-packages/google/api_core/page_iterator.py", line 526, in _next_page
response = self._method(self._request)
File "/usr/local/lib/python2.7/site-packages/google/api_core/gapic_v1/method.py", line 143, in call
return wrapped_func(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/google/api_core/retry.py", line 270, in retry_wrapped_func
on_error=on_error,
File "/usr/local/lib/python2.7/site-packages/google/api_core/retry.py", line 179, in retry_target
return target()
File "/usr/local/lib/python2.7/site-packages/google/api_core/timeout.py", line 214, in func_with_timeout
return func(*args, **kwargs)
File "/usr/local/lib/python2.7/site-packages/google/api_core/grpc_helpers.py", line 59, in error_remapped_callable
six.raise_from(exceptions.from_grpc_error(exc), exc)
File "/usr/local/lib/python2.7/site-packages/six.py", line 737, in raise_from
raise value
google.api_core.exceptions.InternalServerError: 500 Internal error encountered.`

from google-ads-python.

minguezalba avatar minguezalba commented on June 21, 2024

Hi @BenRKarl , don't know why but, without changing anything from yesterday to today, now those lines work! Anyway, thanks you for your answer.

Regards,
Alba

from google-ads-python.

dafi-blinkhealth avatar dafi-blinkhealth commented on June 21, 2024

Hi, I'm also getting the same error for

offline_conversion_feed_service = client.get_service('ConversionUploadService', version='v1')
response = offline_conversion_feed_service.upload_click_conversions({customer_id}, {conversions}, {partial_failure})

Response:

<_Rendezvous of RPC that terminated with:
	status = StatusCode.INTERNAL
	details = "Internal error encountered."
	debug_error_string = "{"created":"@1554754992.576758000","description":"Error received from peer","file":"src/core/lib/surface/call.cc","file_line":1039,"grpc_message":"Internal error encountered.","grpc_status":13}"
>

Is this related?

from google-ads-python.

BenRKarl avatar BenRKarl commented on June 21, 2024

@dafi-blinkhealth can you please paste in the complete error stack trace you're getting?

from google-ads-python.

mbaader avatar mbaader commented on June 21, 2024

Hi Ben,

I checked again on a freshly installed python3 instance and the problem persists:

`Request: {
"customerId": "1234567890",
"query": "SELECT ad_group_ad.ad.id, ad_group_ad.ad.type, ad_group_ad.policy_summary FROM ad_group_ad WHERE campaign.id = 1234567890",
"pageSize": 1000
}

Response

Headers: {
"request-id": "aID3h6SjUBBUM9_YdDHWwA"
}
Fault: {
"created": "@1554817995.049278549",
"description": "Error received from peer",
"file": "src/core/lib/surface/call.cc",
"file_line": 1039,
"grpc_message": "Internal error encountered.",
"grpc_status": 13
}

[2019-04-09 15:53:15,049 - WARNING] Request made: ClientCustomerId: 1234567890, Host: googleads.googleapis.com:443, Method: /google.ads.googleads.v1.services.GoogleAdsService/Search, RequestId: None, IsFault: True, FaultMessage: Internal error encountered.
Traceback (most recent call last):
File "/home/ec2-user/.local/lib/python3.6/site-packages/google/api_core/grpc_helpers.py", line 57, in error_remapped_callable
return callable_(*args, **kwargs)
File "/home/ec2-user/.local/lib/python3.6/site-packages/grpc/_interceptor.py", line 215, in call
wait_for_ready=wait_for_ready)
File "/home/ec2-user/.local/lib/python3.6/site-packages/grpc/_interceptor.py", line 245, in _with_call
return call.result(), call
File "/home/ec2-user/.local/lib/python3.6/site-packages/grpc/_channel.py", line 294, in result
raise self
File "/home/ec2-user/.local/lib/python3.6/site-packages/grpc/_interceptor.py", line 236, in continuation
wait_for_ready=new_wait_for_ready)
File "/home/ec2-user/.local/lib/python3.6/site-packages/grpc/_interceptor.py", line 258, in with_call
wait_for_ready=wait_for_ready)
File "/home/ec2-user/.local/lib/python3.6/site-packages/grpc/_interceptor.py", line 245, in _with_call
return call.result(), call
File "/home/ec2-user/.local/lib/python3.6/site-packages/grpc/_channel.py", line 294, in result
raise self
File "/home/ec2-user/.local/lib/python3.6/site-packages/grpc/_interceptor.py", line 236, in continuation
wait_for_ready=new_wait_for_ready)
File "/home/ec2-user/.local/lib/python3.6/site-packages/grpc/_interceptor.py", line 258, in with_call
wait_for_ready=wait_for_ready)
File "/home/ec2-user/.local/lib/python3.6/site-packages/grpc/_interceptor.py", line 244, in _with_call
continuation, client_call_details, request)
File "/home/ec2-user/.local/lib/python3.6/site-packages/google/ads/google_ads/client.py", line 349, in intercept_unary_unary
self._handle_grpc_failure(response)
File "/home/ec2-user/.local/lib/python3.6/site-packages/google/ads/google_ads/client.py", line 328, in _handle_grpc_failure
raise exception
File "/home/ec2-user/.local/lib/python3.6/site-packages/grpc/_interceptor.py", line 236, in continuation
wait_for_ready=new_wait_for_ready)
File "/home/ec2-user/.local/lib/python3.6/site-packages/grpc/_channel.py", line 559, in with_call
return _end_unary_response_blocking(state, call, True, None)
File "/home/ec2-user/.local/lib/python3.6/site-packages/grpc/_channel.py", line 466, in _end_unary_response_blocking
raise _Rendezvous(state, None, None, deadline)
grpc._channel._Rendezvous: <_Rendezvous of RPC that terminated with:
status = StatusCode.INTERNAL
details = "Internal error encountered."
debug_error_string = "{"created":"@1554817995.049278549","description":"Error received from peer","file":"src/core/lib/surface/call.cc","file_line":1039,"grpc_message":"Internal error encountered.","grpc_status":13}"

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "google_ads_check_single_customer.py", line 106, in
_DEFAULT_PAGE_SIZE)
File "google_ads_check_single_customer.py", line 48, in main
for row in results:
File "/home/ec2-user/.local/lib/python3.6/site-packages/google/api_core/page_iterator.py", line 204, in _items_iter
for page in self._page_iter(increment=False):
File "/home/ec2-user/.local/lib/python3.6/site-packages/google/api_core/page_iterator.py", line 235, in _page_iter
page = self._next_page()
File "/home/ec2-user/.local/lib/python3.6/site-packages/google/api_core/page_iterator.py", line 526, in _next_page
response = self._method(self._request)
File "/home/ec2-user/.local/lib/python3.6/site-packages/google/api_core/gapic_v1/method.py", line 143, in call
return wrapped_func(*args, **kwargs)
File "/home/ec2-user/.local/lib/python3.6/site-packages/google/api_core/retry.py", line 270, in retry_wrapped_func
on_error=on_error,
File "/home/ec2-user/.local/lib/python3.6/site-packages/google/api_core/retry.py", line 179, in retry_target
return target()
File "/home/ec2-user/.local/lib/python3.6/site-packages/google/api_core/timeout.py", line 214, in func_with_timeout
return func(*args, **kwargs)
File "/home/ec2-user/.local/lib/python3.6/site-packages/google/api_core/grpc_helpers.py", line 59, in error_remapped_callable
six.raise_from(exceptions.from_grpc_error(exc), exc)
File "", line 3, in raise_from
google.api_core.exceptions.InternalServerError: 500 Internal error encountered.
`

from google-ads-python.

dafi-blinkhealth avatar dafi-blinkhealth commented on June 21, 2024

@BenRKarl here it is. It's quite similar with what @mbaader is having, grpc error from six

  File "/Users/muhammad.khadafi/.pyenv/versions/2.7.15/lib/python2.7/site-packages/google/ads/google_ads/v1/services/conversion_upload_service_client.py", line 220, in upload_click_conversions
    request, retry=retry, timeout=timeout, metadata=metadata)
  File "/Users/muhammad.khadafi/.pyenv/versions/2.7.15/lib/python2.7/site-packages/google/api_core/gapic_v1/method.py", line 143, in __call__
    return wrapped_func(*args, **kwargs)
  File "/Users/muhammad.khadafi/.pyenv/versions/2.7.15/lib/python2.7/site-packages/google/api_core/retry.py", line 270, in retry_wrapped_func
    on_error=on_error,
  File "/Users/muhammad.khadafi/.pyenv/versions/2.7.15/lib/python2.7/site-packages/google/api_core/retry.py", line 179, in retry_target
    return target()
  File "/Users/muhammad.khadafi/.pyenv/versions/2.7.15/lib/python2.7/site-packages/google/api_core/timeout.py", line 214, in func_with_timeout
    return func(*args, **kwargs)
  File "/Users/muhammad.khadafi/.pyenv/versions/2.7.15/lib/python2.7/site-packages/google/api_core/grpc_helpers.py", line 59, in error_remapped_callable
    six.raise_from(exceptions.from_grpc_error(exc), exc)
  File "/Users/muhammad.khadafi/.pyenv/versions/2.7.15/lib/python2.7/site-packages/six.py", line 737, in raise_from
    raise value
google.api_core.exceptions.InternalServerError: 500 Internal error encountered.

I've tried it on 2.7.15 and 3.6.6

from google-ads-python.

mbaader avatar mbaader commented on June 21, 2024

Hi Ben,

fyi: as of today, this error seems to be fixed. The get_all_disapproved_ads.py and our tools don't throw this error anymore.

Regards

from google-ads-python.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.