Google.Ads.GoogleAds.Examples return Deadline ExceededWhy do I get “python int too large to convert to C long” errors when I use matplotlib's DateFormatter to format dates on the x axis?Plotting line graphUpdating pip not working in ubuntu 14.04An error occurred while starting the karnel - Anaconda pythonJupyter Notebook won't run python 3 - import pygments error_curses.error: prefresh() returned ERRTensorflow model as service gives errorError executing rnn model . How to fix it?Error in predicting from RNN Model using Flask Server
What steps should I take to lawfully visit the United States as a tourist immediately after visiting on a B-1 visa?
How many hours would it take to watch all of Doctor Who?
What is the job of the acoustic cavities inside the main combustion chamber?
What's the minimum number of sensors for a hobby GPS waypoint-following UAV?
Are neural networks prone to catastrophic forgetting?
Is "I do not want you to go nowhere" a case of "DOUBLE-NEGATIVES" as claimed by Grammarly?
Print the last, middle and first character of your code
Modulus Operandi
Received a dinner invitation through my employer's email, is it ok to attend?
C program to parse source code of another language
How would vampires avoid contracting diseases?
RPI3B+: What are the four components below the HDMI connector called?
Terry Pratchett book with a lawyer dragon and sheep
What was the definition of "set" that resulted in Russell's Paradox
Matchmaker, Matchmaker, make me a match
Did the Vulgar Latin verb "toccare" exist?
Are randomly-generated passwords starting with "a" less secure?
How is angular momentum conserved for the orbiting body if the centripetal force disappears?
Referring to different instances of the same character in time travel
Confirming the Identity of a (Friendly) Reviewer After the Reviews
Credit score and financing new car
What's the point of having a RAID 1 configuration over incremental backups to a secondary drive?
Is the genetic term "polycistronic" still used in modern biology?
Machine learning and operations research projects
Google.Ads.GoogleAds.Examples return Deadline Exceeded
Why do I get “python int too large to convert to C long” errors when I use matplotlib's DateFormatter to format dates on the x axis?Plotting line graphUpdating pip not working in ubuntu 14.04An error occurred while starting the karnel - Anaconda pythonJupyter Notebook won't run python 3 - import pygments error_curses.error: prefresh() returned ERRTensorflow model as service gives errorError executing rnn model . How to fix it?Error in predicting from RNN Model using Flask Server
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I am trying to run the first example:Get Campaigns,through the python sdk(ads api,not adwords).
I got an error that did not describe how to solve the problem: google.api_core.exceptions.DeadlineExceeded: 504 Deadline Exceeded
"""This example illustrates how to get all campaigns.
To add campaigns, run add_campaigns.py.
"""
from __future__ import absolute_import
import argparse
import six
import sys
import google.ads.google_ads.client
_DEFAULT_PAGE_SIZE = 10
def main(client, customer_id, page_size):
ga_service = client.get_service('GoogleAdsService', version='v1')
query = ('SELECT campaign.id, campaign.name FROM campaign '
'ORDER BY campaign.id')
results = ga_service.search(customer_id, query=query, page_size=page_size)
try:
for row in results:
print('Campaign with ID %d and name "%s" was found.'
% (row.campaign.id.value, row.campaign.name.value))
except google.ads.google_ads.errors.GoogleAdsException as ex:
print('Request with ID "%s" failed with status "%s" and includes the '
'following errors:' % (ex.request_id, ex.error.code().name))
for error in ex.failure.errors:
print('tError with message "%s".' % error.message)
if error.location:
for field_path_element in error.location.field_path_elements:
print('ttOn field: %s' % field_path_element.field_name)
sys.exit(1)
if __name__ == '__main__':
google_ads_client = (google.ads.google_ads.client.GoogleAdsClient
.load_from_storage("google-ads.yaml"))
main(google_ads_client, "customer_id", _DEFAULT_PAGE_SIZE)
and got the error:
Traceback (most recent call last):
File "c:/PythonProjects/google_ads_api_test/google-ads-python-master/google-ads-python-master/examples/basic_operations/get_campaigns.py", line 68, in <module>
main(google_ads_client, "customer_id", _DEFAULT_PAGE_SIZE)
File "c:/PythonProjects/google_ads_api_test/google-ads-python-master/google-ads-python-master/examples/basic_operations/get_campaigns.py", line 40, in main
for row in results:
File "C:Anaconda3libsite-packagesgoogleapi_corepage_iterator.py", line 204, in _items_iter
for page in self._page_iter(increment=False):
File "C:Anaconda3libsite-packagesgoogleapi_corepage_iterator.py", line 235, in _page_iter
page = self._next_page()
File "C:Anaconda3libsite-packagesgoogleapi_corepage_iterator.py", line 526, in _next_page
response = self._method(self._request)
File "C:Anaconda3libsite-packagesgoogleapi_coregapic_v1method.py", line 143, in __call__
return wrapped_func(*args, **kwargs)
File "C:Anaconda3libsite-packagesgoogleapi_coreretry.py", line 270, in retry_wrapped_func
on_error=on_error,
File "C:Anaconda3libsite-packagesgoogleapi_coreretry.py", line 179, in retry_target
return target()
File "C:Anaconda3libsite-packagesgoogleapi_coretimeout.py", line 214, in func_with_timeout
return func(*args, **kwargs)
File "C:Anaconda3libsite-packagesgoogleapi_coregrpc_helpers.py", line 59, in error_remapped_callable
six.raise_from(exceptions.from_grpc_error(exc), exc)
File "<string>", line 3, in raise_from
google.api_core.exceptions.DeadlineExceeded: 504 Deadline Exceeded
Is something wrong with the call?
python google-ads-api
add a comment |
I am trying to run the first example:Get Campaigns,through the python sdk(ads api,not adwords).
I got an error that did not describe how to solve the problem: google.api_core.exceptions.DeadlineExceeded: 504 Deadline Exceeded
"""This example illustrates how to get all campaigns.
To add campaigns, run add_campaigns.py.
"""
from __future__ import absolute_import
import argparse
import six
import sys
import google.ads.google_ads.client
_DEFAULT_PAGE_SIZE = 10
def main(client, customer_id, page_size):
ga_service = client.get_service('GoogleAdsService', version='v1')
query = ('SELECT campaign.id, campaign.name FROM campaign '
'ORDER BY campaign.id')
results = ga_service.search(customer_id, query=query, page_size=page_size)
try:
for row in results:
print('Campaign with ID %d and name "%s" was found.'
% (row.campaign.id.value, row.campaign.name.value))
except google.ads.google_ads.errors.GoogleAdsException as ex:
print('Request with ID "%s" failed with status "%s" and includes the '
'following errors:' % (ex.request_id, ex.error.code().name))
for error in ex.failure.errors:
print('tError with message "%s".' % error.message)
if error.location:
for field_path_element in error.location.field_path_elements:
print('ttOn field: %s' % field_path_element.field_name)
sys.exit(1)
if __name__ == '__main__':
google_ads_client = (google.ads.google_ads.client.GoogleAdsClient
.load_from_storage("google-ads.yaml"))
main(google_ads_client, "customer_id", _DEFAULT_PAGE_SIZE)
and got the error:
Traceback (most recent call last):
File "c:/PythonProjects/google_ads_api_test/google-ads-python-master/google-ads-python-master/examples/basic_operations/get_campaigns.py", line 68, in <module>
main(google_ads_client, "customer_id", _DEFAULT_PAGE_SIZE)
File "c:/PythonProjects/google_ads_api_test/google-ads-python-master/google-ads-python-master/examples/basic_operations/get_campaigns.py", line 40, in main
for row in results:
File "C:Anaconda3libsite-packagesgoogleapi_corepage_iterator.py", line 204, in _items_iter
for page in self._page_iter(increment=False):
File "C:Anaconda3libsite-packagesgoogleapi_corepage_iterator.py", line 235, in _page_iter
page = self._next_page()
File "C:Anaconda3libsite-packagesgoogleapi_corepage_iterator.py", line 526, in _next_page
response = self._method(self._request)
File "C:Anaconda3libsite-packagesgoogleapi_coregapic_v1method.py", line 143, in __call__
return wrapped_func(*args, **kwargs)
File "C:Anaconda3libsite-packagesgoogleapi_coreretry.py", line 270, in retry_wrapped_func
on_error=on_error,
File "C:Anaconda3libsite-packagesgoogleapi_coreretry.py", line 179, in retry_target
return target()
File "C:Anaconda3libsite-packagesgoogleapi_coretimeout.py", line 214, in func_with_timeout
return func(*args, **kwargs)
File "C:Anaconda3libsite-packagesgoogleapi_coregrpc_helpers.py", line 59, in error_remapped_callable
six.raise_from(exceptions.from_grpc_error(exc), exc)
File "<string>", line 3, in raise_from
google.api_core.exceptions.DeadlineExceeded: 504 Deadline Exceeded
Is something wrong with the call?
python google-ads-api
add a comment |
I am trying to run the first example:Get Campaigns,through the python sdk(ads api,not adwords).
I got an error that did not describe how to solve the problem: google.api_core.exceptions.DeadlineExceeded: 504 Deadline Exceeded
"""This example illustrates how to get all campaigns.
To add campaigns, run add_campaigns.py.
"""
from __future__ import absolute_import
import argparse
import six
import sys
import google.ads.google_ads.client
_DEFAULT_PAGE_SIZE = 10
def main(client, customer_id, page_size):
ga_service = client.get_service('GoogleAdsService', version='v1')
query = ('SELECT campaign.id, campaign.name FROM campaign '
'ORDER BY campaign.id')
results = ga_service.search(customer_id, query=query, page_size=page_size)
try:
for row in results:
print('Campaign with ID %d and name "%s" was found.'
% (row.campaign.id.value, row.campaign.name.value))
except google.ads.google_ads.errors.GoogleAdsException as ex:
print('Request with ID "%s" failed with status "%s" and includes the '
'following errors:' % (ex.request_id, ex.error.code().name))
for error in ex.failure.errors:
print('tError with message "%s".' % error.message)
if error.location:
for field_path_element in error.location.field_path_elements:
print('ttOn field: %s' % field_path_element.field_name)
sys.exit(1)
if __name__ == '__main__':
google_ads_client = (google.ads.google_ads.client.GoogleAdsClient
.load_from_storage("google-ads.yaml"))
main(google_ads_client, "customer_id", _DEFAULT_PAGE_SIZE)
and got the error:
Traceback (most recent call last):
File "c:/PythonProjects/google_ads_api_test/google-ads-python-master/google-ads-python-master/examples/basic_operations/get_campaigns.py", line 68, in <module>
main(google_ads_client, "customer_id", _DEFAULT_PAGE_SIZE)
File "c:/PythonProjects/google_ads_api_test/google-ads-python-master/google-ads-python-master/examples/basic_operations/get_campaigns.py", line 40, in main
for row in results:
File "C:Anaconda3libsite-packagesgoogleapi_corepage_iterator.py", line 204, in _items_iter
for page in self._page_iter(increment=False):
File "C:Anaconda3libsite-packagesgoogleapi_corepage_iterator.py", line 235, in _page_iter
page = self._next_page()
File "C:Anaconda3libsite-packagesgoogleapi_corepage_iterator.py", line 526, in _next_page
response = self._method(self._request)
File "C:Anaconda3libsite-packagesgoogleapi_coregapic_v1method.py", line 143, in __call__
return wrapped_func(*args, **kwargs)
File "C:Anaconda3libsite-packagesgoogleapi_coreretry.py", line 270, in retry_wrapped_func
on_error=on_error,
File "C:Anaconda3libsite-packagesgoogleapi_coreretry.py", line 179, in retry_target
return target()
File "C:Anaconda3libsite-packagesgoogleapi_coretimeout.py", line 214, in func_with_timeout
return func(*args, **kwargs)
File "C:Anaconda3libsite-packagesgoogleapi_coregrpc_helpers.py", line 59, in error_remapped_callable
six.raise_from(exceptions.from_grpc_error(exc), exc)
File "<string>", line 3, in raise_from
google.api_core.exceptions.DeadlineExceeded: 504 Deadline Exceeded
Is something wrong with the call?
python google-ads-api
I am trying to run the first example:Get Campaigns,through the python sdk(ads api,not adwords).
I got an error that did not describe how to solve the problem: google.api_core.exceptions.DeadlineExceeded: 504 Deadline Exceeded
"""This example illustrates how to get all campaigns.
To add campaigns, run add_campaigns.py.
"""
from __future__ import absolute_import
import argparse
import six
import sys
import google.ads.google_ads.client
_DEFAULT_PAGE_SIZE = 10
def main(client, customer_id, page_size):
ga_service = client.get_service('GoogleAdsService', version='v1')
query = ('SELECT campaign.id, campaign.name FROM campaign '
'ORDER BY campaign.id')
results = ga_service.search(customer_id, query=query, page_size=page_size)
try:
for row in results:
print('Campaign with ID %d and name "%s" was found.'
% (row.campaign.id.value, row.campaign.name.value))
except google.ads.google_ads.errors.GoogleAdsException as ex:
print('Request with ID "%s" failed with status "%s" and includes the '
'following errors:' % (ex.request_id, ex.error.code().name))
for error in ex.failure.errors:
print('tError with message "%s".' % error.message)
if error.location:
for field_path_element in error.location.field_path_elements:
print('ttOn field: %s' % field_path_element.field_name)
sys.exit(1)
if __name__ == '__main__':
google_ads_client = (google.ads.google_ads.client.GoogleAdsClient
.load_from_storage("google-ads.yaml"))
main(google_ads_client, "customer_id", _DEFAULT_PAGE_SIZE)
and got the error:
Traceback (most recent call last):
File "c:/PythonProjects/google_ads_api_test/google-ads-python-master/google-ads-python-master/examples/basic_operations/get_campaigns.py", line 68, in <module>
main(google_ads_client, "customer_id", _DEFAULT_PAGE_SIZE)
File "c:/PythonProjects/google_ads_api_test/google-ads-python-master/google-ads-python-master/examples/basic_operations/get_campaigns.py", line 40, in main
for row in results:
File "C:Anaconda3libsite-packagesgoogleapi_corepage_iterator.py", line 204, in _items_iter
for page in self._page_iter(increment=False):
File "C:Anaconda3libsite-packagesgoogleapi_corepage_iterator.py", line 235, in _page_iter
page = self._next_page()
File "C:Anaconda3libsite-packagesgoogleapi_corepage_iterator.py", line 526, in _next_page
response = self._method(self._request)
File "C:Anaconda3libsite-packagesgoogleapi_coregapic_v1method.py", line 143, in __call__
return wrapped_func(*args, **kwargs)
File "C:Anaconda3libsite-packagesgoogleapi_coreretry.py", line 270, in retry_wrapped_func
on_error=on_error,
File "C:Anaconda3libsite-packagesgoogleapi_coreretry.py", line 179, in retry_target
return target()
File "C:Anaconda3libsite-packagesgoogleapi_coretimeout.py", line 214, in func_with_timeout
return func(*args, **kwargs)
File "C:Anaconda3libsite-packagesgoogleapi_coregrpc_helpers.py", line 59, in error_remapped_callable
six.raise_from(exceptions.from_grpc_error(exc), exc)
File "<string>", line 3, in raise_from
google.api_core.exceptions.DeadlineExceeded: 504 Deadline Exceeded
Is something wrong with the call?
python google-ads-api
python google-ads-api
asked Mar 26 at 2:25
wei liuwei liu
112 bronze badges
112 bronze badges
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55348984%2fgoogle-ads-googleads-examples-return-deadline-exceeded%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55348984%2fgoogle-ads-googleads-examples-return-deadline-exceeded%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown