FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Updated Caching by elibixby · Pull Request #20 · GoogleCloudPlatform/python-docs-samples · GitHub

Updated Caching - #20

Closed
elibixby wants to merge 16 commits into
GoogleCloudPlatform:masterfrom
elibixby:master
Closed

Updated Caching#20
elibixby wants to merge 16 commits into
GoogleCloudPlatform:masterfrom
elibixby:master

Conversation

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread bigquery/samples/utils.py Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Is create_scoped required here?

Copy link
Copy Markdown
Contributor

What is the strategy with the READMEs?

Copy link
Copy Markdown
Contributor Author

I think we should put information in the highest directory such that it applies to all subdirectories. This way we avoid duplication, which is the purpose of these changes (just moved two identical files into their shared parent).

Copy link
Copy Markdown
Contributor

Cool, sounds good

Copy link
Copy Markdown
Contributor

more Squashage

Comment thread bigquery/samples/utils.py

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

When I run tox, I get this error:
(python-docs-samples)rennie@rennie:~/gitrepos/python-docs-samples$ tox
py27-nosetest installed: Flask==0.10.1,google-api-python-client==1.4.0,httplib2==0.9.1,itsdangerous==0.24,Jinja2==2.7.3,MarkupSafe==0.23,mock==1.0.1,nose==1.3.6,NoseGAE==0.5.7,oauth2client==1.4.11,pyasn1==0.1.7,pyasn1-modules==0.0.5,rsa==3.1.4,simplejson==3.7.1,six==1.9.0,uritemplate==0.6,Werkzeug==0.10.4
py27-nosetest runtests: PYTHONHASHSEED='4074483713'
py27-nosetest runtests: commands[0] | nosetests --with-gae

EEEEE..S.................

ERROR: test_async_query (bigquery.test.test_async_query.TestAsyncQuery)

Traceback (most recent call last):
File "/usr/local/google/home/rennie/gitrepos/python-docs-samples/bigquery/test/test_async_query.py", line 28, in test_async_query
5):
File "/usr/local/google/home/rennie/gitrepos/python-docs-samples/bigquery/samples/async_query.py", line 48, in run
service = get_service()
File "/usr/local/google/home/rennie/gitrepos/python-docs-samples/bigquery/samples/utils.py", line 23, in get_service
return build('bigquery','v2', credentials=GoogleCredentials.get_application_default())
NameError: global name 'build' is not defined

Copy link
Copy Markdown
Contributor

My prior errors were due to the fact that I clicked the "Google internal-only" box when I created the project.

Now I'm seeing this error:
cover runtests: PYTHONHASHSEED='3998625439'
cover runtests: commands[0] | nosetests --with-gae --with-xunit --with-xcoverage --cover-tests --cover-branches --cover-min-percentage=70 --cover-inclusive --cover-erase

...E...S..................

ERROR: test_stream_row_to_bigquery (bigquery.tests.test_streaming.TestStreaming)

Traceback (most recent call last):
File "/usr/local/google/home/rennie/gitrepos/python-docs-samples/bigquery/tests/test_streaming.py", line 37, in test_stream_row_to_bigquery
5):
File "/usr/local/google/home/rennie/gitrepos/python-docs-samples/bigquery/samples/streaming.py", line 53, in run
num_retries)
File "/usr/local/google/home/rennie/gitrepos/python-docs-samples/bigquery/samples/streaming.py", line 40, in stream_row_to_bigquery
body=insert_all_data).execute(num_retries=num_retries)
File "/usr/local/google/home/rennie/google-cloud-sdk/platform/google_appengine/lib/oauth2client/oauth2client/util.py", line 129, in positional_wrapper
return wrapped(_args, *_kwargs)
File "/usr/local/google/home/rennie/gitrepos/python-docs-samples/.tox/cover/local/lib/python2.7/site-packages/googleapiclient/http.py", line 729, in execute
raise HttpError(resp, content, uri=self.uri)
HttpError: <HttpError 404 when requesting https://www.googleapis.com/bigquery/v2/projects/surferjeff-test2/datasets/test_dataset/tables/test_table2/insertAll?alt=json returned "Not found: Dataset surferjeff-test2:test_dataset">
-------------------- >> begin captured logging << --------------------
googleapiclient.discovery: INFO: URL being requested: GET https://www.googleapis.com/discovery/v1/apis/bigquery/v2/rest
googleapiclient.discovery: INFO: URL being requested: POST https://www.googleapis.com/bigquery/v2/projects/surferjeff-test2/datasets/test_dataset/tables/test_table2/insertAll?alt=json
oauth2client.client: INFO: Attempting refresh to obtain initial access_token
oauth2client.client: INFO: Refreshing access_token
--------------------- >> end captured logging << ---------------------

tmatsuo commented May 22, 2015

Copy link
Copy Markdown
Contributor

@SurferJeffAtGoogle
Yep, I also encountered this error.
I found that, in order to use your own project for the test, you need to create dataset and table defined in the constants file.

Ideally, the test setup should be able to take care of them.
At least, we should update the README for how to run the tests.

Copy link
Copy Markdown
Contributor Author

closed to merge from branch.

elibixby closed this May 22, 2015
donmccasland pushed a commit that referenced this pull request Nov 8, 2022
* docs: add long timeout code snippet

* fix lint

* add timeout
dandhlee pushed a commit that referenced this pull request Nov 9, 2022
* docs: add long timeout code snippet

* fix lint

* add timeout
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL