Unable to Pull GAM Reports

109 views
Skip to first unread message

Michael Brum

unread,
Jan 20, 2017, 12:59:26 PM1/20/17
to GAM for G Suite
I am trying to run a GAM report for my domain using the "gam report users" command, but I keep getting the following error after executing the command:

Traceback (most recent call last):
  File "<string>", line 9356, in <module>
  File "<string>", line 1021, in showReport
KeyError: u'entity'

I have never had an issue running this command in the past.  Has anyone else seen this before or know what causes it?

Thank you.

Ross Scroggs

unread,
Jan 20, 2017, 1:08:30 PM1/20/17
to google-ap...@googlegroups.com
Michael,

What was the full command you executed?

Ross

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/15f75fdc-7b04-486c-ab2d-2fcedff803ea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Michael Brum

unread,
Jan 20, 2017, 1:17:30 PM1/20/17
to GAM for G Suite
gam report users > All.Fields.csv.  I do this every week for my company, and I've never had an issue generating the report to the csv file.


On Friday, January 20, 2017 at 10:08:30 AM UTC-8, Ross Scroggs wrote:
Michael,

What was the full command you executed?

Ross
On Fri, Jan 20, 2017 at 9:55 AM, Michael Brum <br...@gene.com> wrote:
I am trying to run a GAM report for my domain using the "gam report users" command, but I keep getting the following error after executing the command:

Traceback (most recent call last):
  File "<string>", line 9356, in <module>
  File "<string>", line 1021, in showReport
KeyError: u'entity'

I have never had an issue running this command in the past.  Has anyone else seen this before or know what causes it?

Thank you.

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.



--

Ross Scroggs

unread,
Jan 20, 2017, 1:25:51 PM1/20/17
to google-ap...@googlegroups.com
Michael,

What platform/gam version do you have?
Does All.Fields.csv have any thing in it?
Do: gam all users print > Users.csv
If All.Fields.csv has anything in it, go to the last line, note the email address.
In Users.csv, find that same email address and then look at the next line. Get that email address, call it f...@domain.com.
Do: gam info user f...@domain.com.
What happens?
Ross


On Fri, Jan 20, 2017 at 10:17 AM, Michael Brum <br...@gene.com> wrote:
gam report users > All.Fields.csv.  I do this every week for my company, and I've never had an issue generating the report to the csv file.

On Friday, January 20, 2017 at 10:08:30 AM UTC-8, Ross Scroggs wrote:
Michael,

What was the full command you executed?

Ross
On Fri, Jan 20, 2017 at 9:55 AM, Michael Brum <br...@gene.com> wrote:
I am trying to run a GAM report for my domain using the "gam report users" command, but I keep getting the following error after executing the command:

Traceback (most recent call last):
  File "<string>", line 9356, in <module>
  File "<string>", line 1021, in showReport
KeyError: u'entity'

I have never had an issue running this command in the past.  Has anyone else seen this before or know what causes it?

Thank you.

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsubscribe...@googlegroups.com.



--

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.

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



--

Michael Brum

unread,
Jan 20, 2017, 7:18:01 PM1/20/17
to GAM for G Suite
Hi Ross,

The All.Fields.csv file is currently empty.  I generate new csvs for these reports each week so other organizations within our domain can track user changes. As for my platform I am using gam 3.63 on Windows 7.

Michael
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.



--

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.



--

Ross Scroggs

unread,
Jan 20, 2017, 7:42:05 PM1/20/17
to google-ap...@googlegroups.com
Michael,

I'd update to Jay's current version: https://github.com/jay0lee/GAM/releases
Or my cleaned up version of Jay's: https://github.com/taers232c/GAM-B/releases

The gam report users command gets a list of data, one row per user with two major sections: entity and parameters. The row you're getting doesn't have an entity section; then what is it? Hmmm.

Ross

To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsubscribe...@googlegroups.com.



--

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsubscribe...@googlegroups.com.

To post to this group, send email to google-ap...@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.



--

--
You received this message because you are subscribed to the Google Groups "GAM for G Suite" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-manager+unsub...@googlegroups.com.
To post to this group, send email to google-apps-manager@googlegroups.com.

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



--

Ross Scroggs

unread,
Jan 20, 2017, 8:45:04 PM1/20/17
to google-ap...@googlegroups.com
Michael,

My basic version handles the invalid data: https://github.com/taers232c/GAM-B/releases
My version is a drop-in replacement for Jay's version.
Install it in a new folder and copy client-secrets.json, oauth2.txt and oauth2service.json from your current folder to the new folder.

What you need to do is:
gam report users > All.Fields.csv
gam print users primaryemail> Users.csv
You want to compare the email column in All.Fields.csv to the primaryEmail column in Users.csv
They should be in the same order and have the same entries. You're looking for a row in Users.csv that doesn't have a matching row in All.Fields.csv.
If you find a missing user in All.Fields.csv, do "gam info user f...@domain.com" for that user. Is there anything special about the user?

Ross


To post to this group, send email to google-apps-manager@googlegroups.com.
Visit this group at https://groups.google.com/group/google-apps-manager.



--



--
Reply all
Reply to author
Forward
0 new messages