File "gam.py", line 4628, in doGetDomainInfo - KeyError: u'users'

136 views
Skip to first unread message

Jonathan Echeverría Domínguez

unread,
Jun 10, 2014, 4:19:30 AM6/10/14
to google-ap...@googlegroups.com
Hi,

We have the following error in a GAM installation that worked 10 days ago:



# python gam.py info domain

GAM
is made possible and maintained by the work of Dito. Who is Dito?


Dito is solely focused on moving organizations to Google's cloud.  After hundreds of successful deployments over the last 5 years, we have gained notoriety for our complete understanding of the platform, our change management & training ability, and our rock-star deployment engineers.  We are known worldwide as the Google Apps Experts.


Want to learn more about Dito? Hit Y to visit our website (you can switch back to this window when you'
re done). Hit Enter to continue without visiting Dito:
Select the authorized scopes for this token. Include a 'r' to grant read-only
access
or an 'a' to grant action-only access.


[*]  0)  Group Directory API (supports read-only)
[*]  1)  Organizational Unit Directory API (supports read-only)
[*]  2)  User Directory API (supports read-only)
[*]  3)  Chrome OS Device Directory API (supports read-only)
[*]  4)  Mobile Device Directory API (supports read-only and action)
[*]  5)  User Email Settings API
[*]  6)  Calendar Resources API
[*]  7)  Audit Monitors, Activity and Mailbox Exports API
[*]  8)  Admin Settings API
[*]  9)  Groups Settings API
[*] 10)  Calendar Data API (supports read-only)
[*] 11)  Audit Reports API
[*] 12)  Usage Reports API
[*] 13)  Drive API (create report documents for admin user only)
[*] 14)  License Manager API
[*] 15)  User Security Directory API
[*] 16)  Notifications Directory API
[*] 17)  Site Verification API
(*) 18)  IMAP/SMTP Access (send notifications to admin)


     
19)  Select all scopes
     
20)  Unselect all scopes
     
21)  Continue
21
Go to the following link in your browser:


    http
://goo.gl/XXXXXXX


Enter verification code: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Authentication successful.
Google Apps Domain: xxxx.xxxx.es
Traceback (most recent call last):
 
File "gam.py", line 6488, in <module>
    doGetDomainInfo
()
 
File "gam.py", line 4628, in doGetDomainInfo
    customer_id
= callGAPI(service=cd.users(), function=u'list', fields=u'users(customerId)', domain=domain, maxResults=1)[u'users'][0][u'customerId']
KeyError: u'users'


I have revoked the oauth, and regenerated it, but doesn't work. Any ideas?

Regards,

Jonathan

Clif B

unread,
Sep 16, 2014, 11:08:46 AM9/16/14
to google-ap...@googlegroups.com
Hey Jonathan,

Did you ever find an answer to this problem? It just started happening to me yesterday, and I've tried almost everything I can think of to resolve it but have yet to find the answer.

-Clif

Jan Almeroth

unread,
Oct 1, 2014, 6:08:41 AM10/1/14
to google-ap...@googlegroups.com
Hey,

I receive the same error, while getting the customer ID with version 3.21:

Traceback (most recent call last):
  File "./gam.py", line 7080, in <module>
    doGetDomainInfo()
  File "./gam.py", line 5142, in doGetDomainInfo
    customer_id = callGAPI(service=cd.users(), function=u'list', fields=u'users(customerId)', customer=customerId, maxResults=1)[u'users'][0][u'customerId']
KeyError: u'users'

Version 3.03 is able to do the trick. Any thoughts?

Thanks,
Jan 


--
You received this message because you are subscribed to the Google Groups "Google Apps Manager" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/f3447e7e-56e3-49fd-a733-8a48393132f7%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--

Brucknerstraße 15
22083 Hamburg

Telefon: (040) 63 94 37 27
Mobil: (0151) 22 36 84 99

Jan Almeroth

unread,
Oct 1, 2014, 6:21:51 AM10/1/14
to google-ap...@googlegroups.com
I just found the „Oktoberfest“-release on GitHub, which should fix this issue.

Unfortunately I still get error:
Traceback (most recent call last):
  File "./gam.py", line 7321, in <module>
    doGetDomainInfo()
  File "./gam.py", line 5474, in doGetDomainInfo
    customer_id = result[u'users'][0][u'customerId']
KeyError: u'users' 

Jay Lee

unread,
Oct 2, 2014, 7:56:59 AM10/2/14
to google-ap...@googlegroups.com
I just pushed out 3.41 which contains a 2nd attempt to fix the issue, can you give it a shot?


Jay

Clif Ballard

unread,
Oct 2, 2014, 5:36:19 PM10/2/14
to google-ap...@googlegroups.com
Jay - that worked! no errors on executing gam info domain.

Thank you!


--
Clif Ballard
IT System Operations
cli...@groupon.com

--
You received this message because you are subscribed to a topic in the Google Groups "Google Apps Manager" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/LLXgBXfXNfE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-apps-man...@googlegroups.com.

To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-apps-manager.
Reply all
Reply to author
Forward
0 new messages