GeezerVison is showing github.com — tests.system.reader.test_reader_dataframe: test_read_rows_to_dataframe[v1beta2-AVRO-avro_schema] failed · Issue #319 · googleapis/python-bigquery-storage
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.
tests.system.reader.test_reader_dataframe: test_read_rows_to_dataframe[v1beta2-AVRO-avro_schema] failed #319Labels api: bigquerystorageIssues related to the googleapis/python-bigquery-storage API.flakybot: flakyTells the Flaky Bot not to close or comment on this issue.flakybot: issueAn issue filed by the Flaky Bot. Should not be added manually.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns. DescriptionNote: #259 was also for this test, but it was closed more than 10 days ago. So, I didn't mark it flaky.
commit: f5b5d77
buildURL: Build Status, Sponge
status: failed
Test output
client_and_types = (, )
project_id = 'precise-truck-742', data_format = 'AVRO'
expected_schema_type = 'avro_schema'
@pytest.mark.parametrize(
"data_format,expected_schema_type",
(("AVRO", "avro_schema"), ("ARROW", "arrow_schema")),
)
def test_read_rows_to_dataframe(
client_and_types, project_id, data_format, expected_schema_type
):
client, types = client_and_types
read_session = types.ReadSession()
read_session.table = "projects/{}/datasets/{}/tables/{}".format(
"bigquery-public-data", "new_york_citibike", "citibike_stations"
)
read_session.data_format = data_format
session = client.create_read_session(
request={
"parent": "projects/{}".format(project_id),
"read_session": read_session,
"max_stream_count": 1,
}
)
schema_type = session._pb.WhichOneof("schema")
assert schema_type == expected_schema_type
stream = session.streams[0].name
frame = client.read_rows(stream).to_dataframe(
session, dtypes={"latitude": numpy.float16}
)
# Station ID is a required field (no nulls), so the datatype should always
# be integer.
assert frame.station_id.dtype.name == "int64"
assert frame.latitude.dtype.name == "float16"
assert frame.longitude.dtype.name == "float64"
assert frame["name"].str.startswith("Central Park").any()
E AssertionError: assert False
E + where False = <bound method NDFrame._add_numeric_operations..any of 0 False\n1 False\n2 False\n3 False\n4 ...lse\n ... \n549 False\n550 False\n551 False\n552 False\n553 False\nName: name, Length: 554, dtype: bool>()
E + where <bound method NDFrame._add_numeric_operations..any of 0 False\n1 False\n2 False\n3 False\n4 ...lse\n ... \n549 False\n550 False\n551 False\n552 False\n553 False\nName: name, Length: 554, dtype: bool> = 0 False\n1 False\n2 False\n3 False\n4 False\n ... \n549 False\n550 False\n551 False\n552 False\n553 False\nName: name, Length: 554, dtype: bool.any
E + where 0 False\n1 False\n2 False\n3 False\n4 False\n ... \n549 False\n550 False\n551 False\n552 False\n553 False\nName: name, Length: 554, dtype: bool = <bound method StringMethods.startswith of <pandas.core.strings.accessor.StringMethods object at 0x7f3e446e1d60>>('Central Park')
E + where <bound method StringMethods.startswith of <pandas.core.strings.accessor.StringMethods object at 0x7f3e446e1d60>> = <pandas.core.strings.accessor.StringMethods object at 0x7f3e446e1d60>.startswith
E + where <pandas.core.strings.accessor.StringMethods object at 0x7f3e446e1d60> = 0 Driggs Ave & N 9 St\n1 W 42 St & Dyer Ave\n2 University Pl & E 14 St\n3 ...Worth St\n552 W 15 St & 7 Ave\n553 E 16 St & Irving Pl\nName: name, Length: 554, dtype: object.str
tests/system/reader/test_reader_dataframe.py:95: AssertionError Activityadded flakybot: issueAn issue filed by the Flaky Bot. Should not be added manually. priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release. type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns. on Oct 3, 2021flaky-bot commented on Oct 4, 2021 Looks like this issue is flaky. 😟
I'm going to leave this open and stop commenting.
A human should fix and close this.
When run at the same commit (f5b5d77), this test passed in one build (Build Status, Sponge) and failed in another build (Build Status, Sponge). added priority: p2Moderately-important priority. Fix may not be included in next release. and removed priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release. on Oct 11, 2021tswast commented on Nov 11, 2021 Rather strange failure.
____________ test_read_rows_to_dataframe[v1beta2-AVRO-avro_schema] _____________
client_and_types = (<google.cloud.bigquery_storage_v1beta2.BigQueryReadClient object at 0x7f3e48efd280>, <module 'google.cloud.bigquery_s...beta2.types' from '/tmpfs/src/github/python-bigquery-storage/google/cloud/bigquery_storage_v1beta2/types/__init__.py'>)
project_id = 'precise-truck-742', data_format = 'AVRO'
expected_schema_type = 'avro_schema'
@pytest.mark.parametrize(
"data_format,expected_schema_type",
(("AVRO", "avro_schema"), ("ARROW", "arrow_schema")),
)
def test_read_rows_to_dataframe(
client_and_types, project_id, data_format, expected_schema_type
):
client, types = client_and_types
read_session = types.ReadSession()
read_session.table = "projects/{}/datasets/{}/tables/{}".format(
"bigquery-public-data", "new_york_citibike", "citibike_stations"
)
read_session.data_format = data_format
session = client.create_read_session(
request={
"parent": "projects/{}".format(project_id),
"read_session": read_session,
"max_stream_count": 1,
}
)
schema_type = session._pb.WhichOneof("schema")
assert schema_type == expected_schema_type
stream = session.streams[0].name
frame = client.read_rows(stream).to_dataframe(
session, dtypes={"latitude": numpy.float16}
)
# Station ID is a required field (no nulls), so the datatype should always
# be integer.
assert frame.station_id.dtype.name == "int64"
assert frame.latitude.dtype.name == "float16"
assert frame.longitude.dtype.name == "float64"
> assert frame["name"].str.startswith("Central Park").any()
E AssertionError: assert False
E + where False = <bound method NDFrame._add_numeric_operations.<locals>.any of 0 False\n1 False\n2 False\n3 False\n4 ...lse\n ... \n549 False\n550 False\n551 False\n552 False\n553 False\nName: name, Length: 554, dtype: bool>()
E + where <bound method NDFrame._add_numeric_operations.<locals>.any of 0 False\n1 False\n2 False\n3 False\n4 ...lse\n ... \n549 False\n550 False\n551 False\n552 False\n553 False\nName: name, Length: 554, dtype: bool> = 0 False\n1 False\n2 False\n3 False\n4 False\n ... \n549 False\n550 False\n551 False\n552 False\n553 False\nName: name, Length: 554, dtype: bool.any
E + where 0 False\n1 False\n2 False\n3 False\n4 False\n ... \n549 False\n550 False\n551 False\n552 False\n553 False\nName: name, Length: 554, dtype: bool = <bound method StringMethods.startswith of <pandas.core.strings.accessor.StringMethods object at 0x7f3e446e1d60>>('Central Park')
E + where <bound method StringMethods.startswith of <pandas.core.strings.accessor.StringMethods object at 0x7f3e446e1d60>> = <pandas.core.strings.accessor.StringMethods object at 0x7f3e446e1d60>.startswith
E + where <pandas.core.strings.accessor.StringMethods object at 0x7f3e446e1d60> = 0 Driggs Ave & N 9 St\n1 W 42 St & Dyer Ave\n2 University Pl & E 14 St\n3 ...Worth St\n552 W 15 St & 7 Ave\n553 E 16 St & Irving Pl\nName: name, Length: 554, dtype: object.str
Seems like the bike stations table had some stations renamed or just temporarily unavailable.
To avoid flakes, we should rewrite this system test to use a table that doesn't update as frequently. added 🚨This issue needs some love. and removed 🚨This issue needs some love. on Feb 9, 2022
MetadataMetadataapi: bigquerystorageIssues related to the googleapis/python-bigquery-storage API.flakybot: flakyTells the Flaky Bot not to close or comment on this issue.flakybot: issueAn issue filed by the Flaky Bot. Should not be added manually.priority: p2Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns. DevelopmentNo branches or pull requestsIssue actions
|