stat157 / questionnaire

Stat 157 Questionnaire Data Wrangling
1 stars 23 forks source link

Authentication Error of the Google Spreadsheet from the config file #30

Closed rerock closed 11 years ago

rerock commented 11 years ago

I met with Chris earlier today because I failed to run some basic codes on the example ipython notebook (e.g., print "cat"). Later he discovered that nbformat needs to be 2 instead of 3 to work with the apt-get version. So in order to do that, you can be in your questionnaire directory and type "vi example.ipynb" and then change the nbformat from 3 to 2 (By pressing the 'i' key, you can switch to insert mode. Press 'Esc' to return to command mode, and :x to save and exit)

So after that, when I reroad the example python notebook, I am able to see many codes and markdowns. However, I am not able to read the docid of the Google Spreadsheet from the config file. The Authentication Error is "Incorrect username or password". However, these are my correct username and password. I realized there is a space after username: (e.g., username: foobear@berkeley.edu). I tried deleted them, but still, there is an Authentication Error.

Please give me some insights how to fix the problem or fix the problem. Thanks.

rerock commented 11 years ago

I tried both bconnected key and CalNet password as my password (in my stat157.cfg) but I was not able to read the docid of the Google Spreadsheet from the config file.

kqdtran commented 11 years ago

Got the same error as @wliang88. I tried to hardcode the values in client = gspread.login('xyz@berkeley.edu', '*********') but also got the same authentication error.

jzhang980 commented 11 years ago

I had same Problem before. So I did following steps:

  1. I changed the bconnected key (I forgot it the old one)
  2. I went to my stat157.cfg file and changed to the new bconnected key in my VM
  3. run Ipython notebook, copy the code from example.py and run the code, we can read the raw data
  4. After 3, I don't know how to use ipython to clean the raw data.
kqdtran commented 11 years ago

Hmm I did exactly the same in step 1 and 2 about 5 times, but it always failed for me. Let me try that again then...

The code in example.ipynb is identical to example.py (in fact, looking at the code, I think Aaron generated it from the notebook), so you shouldn't have to copy and paste.

Will keep you posted if I can get the authentication issue resolved...

jzhang980 commented 11 years ago

ok, That code only for read the first three rows :

{'Timestamp': '9/4/2013 20:48:39', 'What is your learning style?': ''} {'Timestamp': '9/4/2013 21:48:39', 'What is your learning style?': 'Your scores were:\n\nVisual: 3\nAural: 5\nRead/Write: 4\nKinesthetic: 7\n\nYou have a mild Kinesthetic learning preference.'} {'Timestamp': '9/4/2013 21:48:45', 'What is your learning style?': 'I have a multimodal (VAK) learning preference.'}

I typed :print filtered_data , it shows all

BTW, we are group 6, my group members helped me a lot. Thank you guys!

kqdtran commented 11 years ago

okayyyy now I'm setting my own key instead of using a predefined key, and IT WORKS!

@wliang88 try setting your own key!

rerock commented 11 years ago

yeah, and when setting your own key please dont use a Non-alphanumeric character. That was my problem.