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_table_to_dataframe failed #70

@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 0x7f15dad61a58>
clients = (, )
def test_table_to_dataframe(capsys, clients):
    from google.cloud import bigquery

    bqclient, bqstorageclient = clients

    # [START bigquerystorage_pandas_tutorial_all]
    # [START bigquerystorage_pandas_tutorial_read_table]
    # Download a table.
    table = bigquery.TableReference.from_string(
        "bigquery-public-data.utility_us.country_code_iso"
    )
    rows = bqclient.list_rows(
        table,
        selected_fields=[
            bigquery.SchemaField("country_name", "STRING"),
            bigquery.SchemaField("fips_code", "STRING"),
        ],
    )
  dataframe = rows.to_dataframe(bqstorage_client=bqstorageclient)

main_test.py:59:


.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('bigquery-public-data', 'utility_us'), 'country_code_iso'))
bqstorage_client = <google.cloud.bigquery_storage_v1.BigQueryReadClient object at 0x7f15dabed208>
preserve_order = False
selected_fields = [SchemaField('country_name', 'STRING', 'NULLABLE', None, (), None), SchemaField('fips_code', 'STRING', 'NULLABLE', None, (), 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