-
Notifications
You must be signed in to change notification settings - Fork 3
Keep getting asked for credentials in CLI? #1
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
Hey nimsim! I recommend updating the requirements.txt with the latest gbq package. https://pandas-gbq.readthedocs.io/en/latest/ Also, I'd double check all your apis are enabled and that you're making sure the project and dataset IDs are aligned within the Python script and your bigquery interface. |
Thanks for the answer, names are exact copies, same with apis, although I saw app engine API become enabled in Cloud Shell.
I'll update the panda requirement and see how it goes. Do you do calls to the data with API token from socrata/cityofchicago?
EDIT: Everything installs fine, which might not be clear in the OP. The issue is after setting everything up and running the first cron-job, I get asked to authorize. Maybe it's trying to auth to BigQuery
/Nima
…________________________________
From: sungchun12 <notifications@github.com>
Sent: Tuesday, April 24, 2018 00:34
To: sungchun12/schedule-python-script-using-Google-Cloud
Cc: Nima Gharib; Author
Subject: Re: [sungchun12/schedule-python-script-using-Google-Cloud] Keep getting asked for credentials in CLI? (#1)
Hey nimsim!
I recommend updating the requirements.txt with the latest gbq package. https://pandas-gbq.readthedocs.io/en/latest/
Also, I'd double check all your apis are enabled and that you're making sure the project and dataset IDs are aligned within the Python script and your bigquery interface.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#1 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/Ag9MfJf-USqVIz73sNpSh2PQUTjSqCRfks5trlbtgaJpZM4TgXXP>.
|
Updated requirements.txt with the latest package, but no go :( |
The script calls to the api token from socrata. Looking at the error code in more detail, it definitely has to do with the pandas gbq package and access issues to bigquery. Try opening up the "append_data" script in a datalab notebook and run it manually to see if it breaks. Send me a screenshot of your append_data code. I have a hunch the parameters are entered incorrectly. |
Thanks for looking into it, append_data below. Trying datalab later tonight
|
did you create a dataset id named "chicago_traffic" and an empty table named "demo_data"? |
I didn't create demo_data. I read it as it would create one itself if it didn't exist. Also instructions only mention creating the dataset ID. You need to have at least one field in an empty table, did you plot in all fields expected from the stream? |
Tried to set up a new project and going through the setup again, this time with demo_data. Thanks for the help, and sorry for asking so many questions. |
My mistake on creating the demo_data table. You shouldn't have to. Some weird access issue must be going on/the latest packages aren't correct in the requirements.txt file. So strange that it's not working as mine is working just fine. If you need more help, feel free to ask! No need to apologize 😃 Would love to see your cloud functions demo when it's finished! I saw a couple medium blogs about it. |
Heya,
This was just what I was looking for, but it seems I'm having major difficulties getting it to actually run.
Done exactly what you've written, tried with both API-key and without. Keep getting this error:
File "/env/local/lib/python2.7/site-packages/pandas_gbq/gbq.py", line 194, in get_credentials credentials = self.get_user_account_credentials() File "/env/local/lib/python2.7/site-packages/pandas_gbq/gbq.py", line 370, in get_user_account_credentials credentials = app_flow.run_console() File "/env/local/lib/python2.7/site-packages/google_auth_oauthlib/flow.py", line 362, in run_console code = input(authorization_code_message) EOFError: EOF when reading a line
Do you have any idea why?
The text was updated successfully, but these errors were encountered: