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

KeyError: u'client_email' #25

Closed
rinchen opened this issue Dec 4, 2014 · 5 comments
Closed

KeyError: u'client_email' #25

rinchen opened this issue Dec 4, 2014 · 5 comments

Comments

@rinchen
Copy link

rinchen commented Dec 4, 2014

Using

Dito GAM 3.42 - http://git.io/gam
Jay Lee jay0lee@gmail.com
Python 2.7.8 64-bit final
google-api-python-client 1.3.1
Linux-3.16.0-25-generic-x86_64-with-Ubuntu-14.10-utopic x86_64

I run (with the user@domain replaced here in this ticket)

./gam.py user test@domain.com show filelist

and I get

Traceback (most recent call last):
File "./gam.py", line 7599, in
showDriveFiles(users)
File "./gam.py", line 1873, in showDriveFiles
drive = buildGAPIServiceObject(u'drive', user)
File "./gam.py", line 589, in buildGAPIServiceObject
SERVICE_ACCOUNT_EMAIL = json_data[u'client_email']
KeyError: u'client_email'

If I try

./gam.py all users show filelist query "fullText contains 'TEST'"

I get the same thing.

@rinchen
Copy link
Author

rinchen commented Dec 4, 2014

I should note that I can issue other commands (info domain, print users, etc) just fine. I double checked the cloud panel to ensure I have the drive API enabled, and I do.

@rinchen
Copy link
Author

rinchen commented Dec 4, 2014

I tried this with 3.41 and get the same error:

Traceback (most recent call last):
File "gam.py", line 7510, in
showDriveFiles(users)
File "gam.py", line 1840, in showDriveFiles
drive = buildGAPIServiceObject(u'drive', user)
File "gam.py", line 595, in buildGAPIServiceObject
SERVICE_ACCOUNT_EMAIL = json_data[u'client_email']
KeyError: u'client_email'

@rinchen
Copy link
Author

rinchen commented Dec 4, 2014

I was able to fix this problem by regenerating the oauth2service json and p12. So there probably needs to be some error checking in there to report when these aren't working correct vs generating a KeyError.

@DanielAjoy
Copy link

Same problem.

After getting oauth2service.json by following these instructions

https://github.com/jay0lee/GAM/wiki/CreatingClientSecretsFile#creating-your-own-oauth2servicejson

and successfully running

gam oauth info

and

gam info domain

I tried:

gam user XXX@YYYY.org show filelist

But I got:

Traceback (most recent call last):
File "gam.py", line 7599, in
showDriveFiles(users)
File "gam.py", line 1873, in showDriveFiles
drive = buildGAPIServiceObject(u'drive', user)
File "gam.py", line 589, in buildGAPIServiceObject
SERVICE_ACCOUNT_EMAIL = json_data[u'client_email']
KeyError: u'client_email'

What could be going on?

@rinchen
Copy link
Author

rinchen commented Feb 11, 2015

@DanielAjoy if it's the same as my problem, your keys are out of sync. If you can regenerate them as per my comment above it should work again....at least, it did for me.

@jay0lee jay0lee closed this as completed Oct 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants