Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

samples.to_dataframe.jupyter_test: test_jupyter_small_query failed #68

Closed
flaky-bot bot opened this issue Sep 30, 2020 · 2 comments · Fixed by #72
Closed

samples.to_dataframe.jupyter_test: test_jupyter_small_query failed #68

flaky-bot bot opened this issue Sep 30, 2020 · 2 comments · Fixed by #72
Assignees
Labels
api: bigquerystorage Issues related to the googleapis/python-bigquery-storage API. priority: p2 Moderately-important priority. Fix may not be included in next release. samples Issues that are directly related to samples. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@flaky-bot
Copy link

flaky-bot bot commented Sep 30, 2020

This test failed!

To configure my behavior, see the Build Cop Bot documentation.

If I'm commenting on this issue too often, add the buildcop: quiet label and
I will stop commenting.


commit: 6254bf2
buildURL: Build Status, Sponge
status: failed

Test output
use_bqstorage_api = True
credentials = 
def _make_bqstorage_client(use_bqstorage_api, credentials):
    if not use_bqstorage_api:
        return None

    try:
      from google.cloud import bigquery_storage_v1beta1

E ImportError: cannot import name 'bigquery_storage_v1beta1'

.nox/py-3-6/lib/python3.6/site-packages/google/cloud/bigquery/magics.py:606: ImportError

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

ipython = <IPython.terminal.interactiveshell.TerminalInteractiveShell object at 0x7f15efda1828>

def test_jupyter_small_query(ipython):
    ip = IPython.get_ipython()
    ip.extension_manager.load_extension("google.cloud.bigquery")

    # Include a small query to demonstrate that it falls back to the
    # tabledata.list API when the BQ Storage API cannot be used.
    sample = """
    # [START bigquerystorage_jupyter_tutorial_fallback]
    %%bigquery stackoverflow --use_bqstorage_api
    SELECT
      CONCAT(
        'https://stackoverflow.com/questions/',
        CAST(id as STRING)) as url,
      view_count
    FROM `bigquery-public-data.stackoverflow.posts_questions`
    WHERE tags like '%google-bigquery%'
    ORDER BY view_count DESC
    LIMIT 10
    # [END bigquerystorage_jupyter_tutorial_fallback]
    """

    result = ip.run_cell(_strip_region_tags(sample))
  result.raise_error()  # Throws an exception if the cell failed.

jupyter_test.py:74:


.nox/py-3-6/lib/python3.6/site-packages/IPython/core/interactiveshell.py:331: in raise_error
raise self.error_in_exec
.nox/py-3-6/lib/python3.6/site-packages/IPython/core/interactiveshell.py:3319: in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
:1: in
get_ipython().run_cell_magic('bigquery', 'stackoverflow --use_bqstorage_api', "SELECT\n CONCAT(\n 'https://stackoverflow.com/questions/',\n CAST(id as STRING)) as url,\n view_count\nFROM bigquery-public-data.stackoverflow.posts_questions\nWHERE tags like '%google-bigquery%'\nORDER BY view_count DESC\nLIMIT 10\n\n")
.nox/py-3-6/lib/python3.6/site-packages/IPython/core/interactiveshell.py:2352: in run_cell_magic
result = fn(*args, **kwargs)
.nox/py-3-6/lib/python3.6/site-packages/google/cloud/bigquery/magics.py:506: in _cell_magic
args.use_bqstorage_api or context.use_bqstorage_api, context.credentials
.nox/py-3-6/lib/python3.6/site-packages/google/cloud/bigquery/magics.py:612: in _make_bqstorage_client
six.raise_from(customized_error, err)


value = None
from_value = ImportError("cannot import name 'bigquery_storage_v1beta1'",)

???
E ImportError: Install the google-cloud-bigquery-storage and pyarrow packages to use the BigQuery Storage API.

:3: ImportError

@flaky-bot flaky-bot bot added buildcop: issue priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Sep 30, 2020
@product-auto-label product-auto-label bot added api: bigquerystorage Issues related to the googleapis/python-bigquery-storage API. samples Issues that are directly related to samples. labels Sep 30, 2020
@plamut
Copy link
Contributor

plamut commented Sep 30, 2020

Will be fixed when BigQuery v2.0 is released (PR).

@yoshi-automation yoshi-automation added 🚨 This issue needs some love. and removed 🚨 This issue needs some love. labels Oct 5, 2020
@meredithslota meredithslota added priority: p2 Moderately-important priority. Fix may not be included in next release. and removed priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. labels Oct 5, 2020
@flaky-bot flaky-bot bot reopened this Oct 17, 2020
@flaky-bot
Copy link
Author

flaky-bot bot commented Oct 17, 2020

Looks like this issue is flaky. 😟

I'm going to leave this open and stop commenting.

A human should fix and close this.


commit: a7fe762
buildURL: Build Status, Sponge
status: failed

Test output
use_bqstorage_api = True
credentials = 
def _make_bqstorage_client(use_bqstorage_api, credentials):
    if not use_bqstorage_api:
        return None

    try:
      from google.cloud import bigquery_storage_v1beta1

E ImportError: cannot import name 'bigquery_storage_v1beta1'

.nox/py-3-6/lib/python3.6/site-packages/google/cloud/bigquery/magics.py:606: ImportError

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

ipython = <IPython.terminal.interactiveshell.TerminalInteractiveShell object at 0x7fa31c972828>

def test_jupyter_small_query(ipython):
    ip = IPython.get_ipython()
    ip.extension_manager.load_extension("google.cloud.bigquery")

    # Include a small query to demonstrate that it falls back to the
    # tabledata.list API when the BQ Storage API cannot be used.
    sample = """
    # [START bigquerystorage_jupyter_tutorial_fallback]
    %%bigquery stackoverflow --use_bqstorage_api
    SELECT
      CONCAT(
        'https://stackoverflow.com/questions/',
        CAST(id as STRING)) as url,
      view_count
    FROM `bigquery-public-data.stackoverflow.posts_questions`
    WHERE tags like '%google-bigquery%'
    ORDER BY view_count DESC
    LIMIT 10
    # [END bigquerystorage_jupyter_tutorial_fallback]
    """

    result = ip.run_cell(_strip_region_tags(sample))
  result.raise_error()  # Throws an exception if the cell failed.

jupyter_test.py:74:


.nox/py-3-6/lib/python3.6/site-packages/IPython/core/interactiveshell.py:331: in raise_error
raise self.error_in_exec
.nox/py-3-6/lib/python3.6/site-packages/IPython/core/interactiveshell.py:3319: in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
:1: in
get_ipython().run_cell_magic('bigquery', 'stackoverflow --use_bqstorage_api', "SELECT\n CONCAT(\n 'https://stackoverflow.com/questions/',\n CAST(id as STRING)) as url,\n view_count\nFROM bigquery-public-data.stackoverflow.posts_questions\nWHERE tags like '%google-bigquery%'\nORDER BY view_count DESC\nLIMIT 10\n\n")
.nox/py-3-6/lib/python3.6/site-packages/IPython/core/interactiveshell.py:2352: in run_cell_magic
result = fn(*args, **kwargs)
.nox/py-3-6/lib/python3.6/site-packages/google/cloud/bigquery/magics.py:506: in _cell_magic
args.use_bqstorage_api or context.use_bqstorage_api, context.credentials
.nox/py-3-6/lib/python3.6/site-packages/google/cloud/bigquery/magics.py:612: in _make_bqstorage_client
six.raise_from(customized_error, err)


value = None
from_value = ImportError("cannot import name 'bigquery_storage_v1beta1'",)

???
E ImportError: Install the google-cloud-bigquery-storage and pyarrow packages to use the BigQuery Storage API.

:3: ImportError

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquerystorage Issues related to the googleapis/python-bigquery-storage API. priority: p2 Moderately-important priority. Fix may not be included in next release. samples Issues that are directly related to samples. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants