-
Notifications
You must be signed in to change notification settings - Fork 313
Attribute error on bigquery import #646
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
Comments
@pj598 I was not able to reproduce the error in a fresh 3.8 virtualenv. Simply running
Would you mind sharing the output of
|
This part of the traceback is interesting:
The This part was changed 7 months ago in a preparation for the 2.0 release, thus I suspect a different version of Could you double check and print the version at runtime? What's the output? Edit:
|
Here's the output of pip freeze. Still showing that
When I double checked the version at runtime:
I installed everything on Friday and then updated it on Monday morning (as part of a last ditch effort to troubleshoot) |
The versions look fine, but what's the output if the following is placed at the very top of the application's entry point? from google.cloud import bigquery
print(getattr(bigquery, "__version__", "older than 2.2.0") The version reported by In [1]: import pkg_resources
In [2]: from google.cloud import bigquery
In [3]: pkg_resources.get_distribution("google-cloud-bigquery").version
Out[3]: '1.28.0'
In [4]: print(getattr(bigquery, "__version__", "older than 2.2.0"))
2.15.0 Checking the Edit: print(bigquery.__path__) See if it's indeed the location you expect and if its code matches a 2.x release. 🙂 |
Sorry bear with me, I'm new to code. When I tried using the code above, I got the same traceback error. I did just check anaconda navigator specifically though, and its showing that google-cloud-bigquery is version 1.22.0 (which I would assume means the issue is actually with updating the package in anaconda?). |
@pj598 No worries, we at least confirmed the theory that a different version of the BigQuery client is used than expected. Yes, it looks like the issue with anaconda installation. When the package is upgraded to the latest version there, the import error should disappear. |
Thank you for all of your help! |
Since the solution has been found, I'm closing this issue, but feel free to re-open it, should you still experience problems. |
I've been getting an attribute error whenever I try to import pandas-gbq. They suggested I try asking for help here, since it's breaking on the bigquery import.
google-cloud-bigquery
version: 2.15.0Thanks!
The text was updated successfully, but these errors were encountered: