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

confusing error when closing AppendRowsStream that has never been opened / streamed to #302

@tswast

Description

@tswast
Exception in thread Thread-RegularStreamShutdown:
Traceback (most recent call last):
  File "/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/threading.py", line 954, in _bootstrap_inner
    self.run()
  File "/usr/local/Caskroom/miniconda/base/envs/dev-3.9/lib/python3.9/threading.py", line 892, in run
    self._target(*self._args, **self._kwargs)
  File "/Users/swast/src/github.com/googleapis/python-bigquery-storage/google/cloud/bigquery_storage_v1beta2/writer.py", line 296, in _shutdown
    self._rpc.close()
AttributeError: 'NoneType' object has no attribute 'close'

Instead, the error should indicate that the stream hasn't been opened. Or just no-op...

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.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