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
BUG: Add bigquery scope for google credentials #33
Conversation
Codecov Report
@@ Coverage Diff @@
## master #33 +/- ##
===========================================
- Coverage 74.42% 28.91% -45.51%
===========================================
Files 4 4
Lines 1552 1553 +1
===========================================
- Hits 1155 449 -706
- Misses 397 1104 +707
Continue to review full report at Codecov.
|
this would need a test. |
@xcompass The Google Application Default Credentials docs mentions the following:
Based on this text, I don't expect we will need to add I'm happy to help you troubleshoot further. Does this issue occur every time you run the sample code? |
In order to create a similar environment to re-create the issue on my end, please let me know which versions you have installed for: |
@parthea. Here are the versions:
Here are the logs how I test it:
|
It seems the tests you have for this are skipped: https://travis-ci.org/pydata/pandas-gbq/jobs/228579445#L601 and https://travis-ci.org/pydata/pandas-gbq/jobs/228579445#L602. Did you setup the google credentials in the environment variables in travis? If yes, it could be skipped because of this bug. |
It don't think it is true according to the source code: https://github.com/google/google-api-python-client/blob/master/googleapiclient/discovery.py#L358. When you pass in http object, it bypasses the scope handling. |
Just got a reply from google-api-python-client repo for the issue I created relate to this. googleapis/google-api-python-client#394 (comment). It seem you have to handle scope yourself if you are using build(). |
ok, this seems reasonable. can you add an entry to the changelog? |
Bigquery requires scoped credentials when loading application default credentials
@jreback sorry for the delay. Was off the grid for a vacation. I've updated the changelog. Let me know if there is anything else. |
@parthea ok with this? |
conflict is resolved. |
I believe I handled this when I converted to the google-auth library. |
@tswast Thanks. But I don't think so. I just tested with above script. Still get
|
can you rebase |
@tswast my bad. I was using the wrong script. I can confirm that your commit fix the issue. This PR is no longer need. I'm closing this. |
Bigquery requires scoped credentials when loading application default credentials
Quick test code below, it will return "invalid token" error. When uncomment the create_scoped() statement, the code run correctly without any error.