"gam print groups settings" just broke

504 views
Skip to first unread message

McNeight

unread,
Sep 20, 2012, 7:43:30 PM9/20/12
to google-ap...@googlegroups.com
To grab information on settings in the groups I have, I've been running:
..\gam print groups description permission settings > groups.csv

This gives me a long list of settings that I can bulk modify and then feed back into a PowerShell script that uses gam to write the settings back. Really nice for making settings consistent.

Today, I ran the command and got the following error:
Traceback (most recent call last):
  File "gam.py", line 6430, in <module>
  File "gam.py", line 5248, in doPrintGroups
  File "csv.pyo", line 153, in writerows
  File "csv.pyo", line 144, in _dict_to_list
ValueError: dict contains fields not in fieldnames: include_In_Global_Address_List, spam_Moderation_Level

At this point, gam exits and does not write the contents out to the groups.csv file. I know that the last time the command worked was on September 1st, but I don't know at what point after that things might have changed. The output of gam without any options is:
Google Apps Manager 2.51
Python 2.7.3 final
Windows-2008ServerR2-6.1.7601-SP1 AMD64

No huge hurry, but any help you can provide would be appreciated.

-Neil

Jay Lee

unread,
Sep 20, 2012, 8:43:56 PM9/20/12
to google-ap...@googlegroups.com
Very interesting. It looks like Google updated the Group Settings API with the ability to set the spam moderation level and whether or not the group is included in the GAL.

I'll try to get a new version of GAM out soon that can take advantage of these new settings (and fix the error on print groups).

Regards,

Jay Lee
LCS Deployment Lead   |  ⚡ Dito



--
You received this message because you are subscribed to the "Google Apps Manager" group.
To post to this group, send email to
google-ap...@googlegroups.com
To unsubscribe from this group, send email to
google-apps-man...@googlegroups.com
For more options, visit this group at
https://groups.google.com/forum/#!forum/google-apps-manager

Cliff Wakefield

unread,
Sep 24, 2012, 12:16:36 AM9/24/12
to google-ap...@googlegroups.com
GAM 2.53 is out, fixes the issue!

Thanks Jay!

McNeight

unread,
Sep 26, 2012, 11:19:56 AM9/26/12
to google-ap...@googlegroups.com
Works as advertised. Thank you!

-Neil

Thibault Mortier

unread,
Sep 28, 2012, 9:25:57 AM9/28/12
to google-ap...@googlegroups.com
Hello,

While using gam print groups setting > groupssettingsexport.csv
I am facing this error:

Traceback (most recent call last):
  File "gam.py", line 6592, in <module>
  File "gam.py", line 5410, in doPrintGroups
  File "csv.pyo", line 154, in writerows
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 30: ordinal not in range(128)

The .csv is not fully completed only 600/1000 groups are display. I though is was an problem of encoding of one of the groups IDs but could not find any strangely formated.

But when I am using "gam print groups > doc.csv, the script runs correctly and the csv is clean and correct.

Does anyone has a clue on what it could be ?
Message has been deleted

Thomas Nielsen

unread,
Oct 5, 2012, 2:42:31 AM10/5/12
to google-ap...@googlegroups.com
Are you using gam on Windows ? 
I have had many problems with that in relation with Unicode. I ended up installing a virtual Linux on my windows box and is running it from there...
Reply all
Reply to author
Forward
0 new messages