Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Nov 12, 2025. It is now read-only.
This repository was archived by the owner on Nov 12, 2025. It is now read-only.

samples.to_dataframe.main_test: test_query_to_dataframe failed #71

@flaky-bot

Description

@flaky-bot

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
capsys = <_pytest.capture.CaptureFixture object at 0x7f15dace1390>
clients = (, )
def test_query_to_dataframe(capsys, clients):
    bqclient, bqstorageclient = clients

    # [START bigquerystorage_pandas_tutorial_all]
    # [START bigquerystorage_pandas_tutorial_read_query_results]
    # Download query results.
    query_string = """
    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
    """

    dataframe = (
        bqclient.query(query_string)
        .result()
      .to_dataframe(bqstorage_client=bqstorageclient)
    )

main_test.py:88:


.nox/py-3-6/lib/python3.6/site-packages/google/cloud/bigquery/table.py:1735: in to_dataframe
create_bqstorage_client=create_bqstorage_client,
.nox/py-3-6/lib/python3.6/site-packages/google/cloud/bigquery/table.py:1549: in to_arrow
bqstorage_client=bqstorage_client
.nox/py-3-6/lib/python3.6/site-packages/google/cloud/bigquery/table.py:1420: in _to_page_iterable
for item in bqstorage_download():


project_id = 'python-docs-samples-tests'
table = Table(TableReference(DatasetReference('python-docs-samples-tests', '_d5c40c0e092f2208d182028dd13910fd3f0ceb53'), 'anona8cd752bfd7a2b6c416491375c5c6d96d48ffb8b'))
bqstorage_client = <google.cloud.bigquery_storage_v1.BigQueryReadClient object at 0x7f15dacf16d8>
preserve_order = <_sre.SRE_Match object; span=(229, 237), match='ORDER BY'>
selected_fields = None
page_to_item = <function _bqstorage_page_to_arrow at 0x7f15daf65158>

def _download_table_bqstorage(
    project_id,
    table,
    bqstorage_client,
    preserve_order=False,
    selected_fields=None,
    page_to_item=None,
):
    """Use (faster, but billable) BQ Storage API to construct DataFrame."""
    if "$" in table.table_id:
        raise ValueError(
            "Reading from a specific partition is not currently supported."
        )
    if "@" in table.table_id:
        raise ValueError("Reading from a specific snapshot is not currently supported.")
  read_options = bigquery_storage_v1beta1.types.TableReadOptions()

E AttributeError: 'NoneType' object has no attribute 'types'

.nox/py-3-6/lib/python3.6/site-packages/google/cloud/bigquery/_pandas_helpers.py:620: AttributeError

Metadata

Metadata

Assignees

Labels

api: bigquerystorageIssues related to the googleapis/python-bigquery-storage API.priority: p2Moderately-important priority. Fix may not be included in next release.samplesIssues that are directly related to samples.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions