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

Incompatible with google-cloud-bigquery-storage>=2.0.0 #329

Closed
andrewbrown248 opened this issue Sep 30, 2020 · 3 comments · Fixed by #334
Closed

Incompatible with google-cloud-bigquery-storage>=2.0.0 #329

andrewbrown248 opened this issue Sep 30, 2020 · 3 comments · Fixed by #334
Assignees
Labels
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.

Comments

@andrewbrown248
Copy link

In the 2.0.0 version of google-cloud-bigquery-storage, they dropped the bigquery_storage_v1beta1 module for just bigquery_storage. This causes the following line to fail importing with google-cloud-bigquery-storage>=2.0.0.

https://github.com/pydata/pandas-gbq/blob/d251db03b159447331ac9ae63e13d295d75bad70/pandas_gbq/gbq.py#L20

Later, when trying to use the storage api, the following error is thrown since the module was unable to be imported.

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

Dropped bigquery_storage_v1beta1 module:

(env) abrown:~$ pip list | grep google-cloud-bigquery-storage
google-cloud-bigquery-storage  2.0.0    
(env) abrown:~$ python
Python 3.7.9 (default, Aug 27 2020, 21:59:41) 
[GCC 7.3.1 20180712 (Red Hat 7.3.1-9)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from google.cloud import bigquery_storage_v1beta1
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name 'bigquery_storage_v1beta1' from 'google.cloud' (unknown location)
>>> from google.cloud import bigquery_storage
>>>
@tswast tswast added priority: p0 Highest priority. Critical issue. P0 implies highest priority. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Sep 30, 2020
@tswast
Copy link
Collaborator

tswast commented Sep 30, 2020

Thank you for the report! The temporary fix is probably to release a patch release with the correct top bound dependencies in setup.py.

Long term, it'll make sense to ensure it works with the 2.0 package, as that's where improvements will be made.

@tswast
Copy link
Collaborator

tswast commented Sep 30, 2020

Looks like we don't actually define google-cloud-bigquery-storage as a dependency in setup.py (even though it's needed for best performance). I'll check the pandas-gbq conda feedstock and make sure we define a maximum version there.

@tswast
Copy link
Collaborator

tswast commented Sep 30, 2020

It's also not defined in the feedstock (perhaps something to update), but is set to limit to less than 2.0dev in google-cloud-bigquery

https://github.com/conda-forge/google-cloud-bigquery-feedstock/blob/3bf0d97f7e88c01b66421768183b7bf3b8ed7842/recipe/meta.yaml#L119

@tswast tswast added priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. and removed priority: p0 Highest priority. Critical issue. P0 implies highest priority. labels Sep 30, 2020
@tswast tswast self-assigned this Oct 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants