Traceback error

186 views
Skip to first unread message

Rhys Andrews

unread,
May 16, 2016, 7:38:48 PM5/16/16
to Google Apps Manager
Hi!
I've been using GAM for menial commands for a while now, but I've been working on an automated system for applying email signatures to staff.

I am using this command:
gam csv <path-to-csv> gam user ~Email signature file ~SigFile

The CSV looks like this:

Email,SigFile
rh...@domain.com,rhysSig.txt
b...@domain.com,bobSig.txt

The text files contain HTML code with personalised email signatures and are stored in the same directory as the CSV.
I had tested doing this individually without CSV (but with a text file), and it worked no problem.

But with the CSV file, I get:

Traceback (most recent call last):

  File "/Applications/GAM/gam.py", line 9159, in <module>

    for row in input_file:

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/csv.py", line 107, in next

    self.fieldnames

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/csv.py", line 90, in fieldnames

    self._fieldnames = self.reader.next()

_csv.Error: new-line character seen in unquoted field - do you need to open the file in universal-newline mode?


Hoping somebody can help!

Thanks

Rhys

Jay Lee

unread,
May 16, 2016, 7:40:06 PM5/16/16
to Google Apps Manager

Error indicates a formatting issue with your CSV. Make sure all CSV lines have the proper number of columns.

Jay


--
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 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/87c6067d-1302-450d-9191-21340efc66fd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

Jay

Rhys Andrews

unread,
May 18, 2016, 9:51:29 PM5/18/16
to Google Apps Manager
Hi Jay,
I've triple checked the CSV and it's such a simple CSV that I can't see how I have got it wrong.

With SigFile referencing filenames, which directory does GAM look for those files?

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

Jay

Ross Scroggs

unread,
May 19, 2016, 10:44:51 AM5/19/16
to google-ap...@googlegroups.com
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 https://groups.google.com/group/google-apps-manager.

Rhys Andrews

unread,
May 19, 2016, 9:37:18 PM5/19/16
to Google Apps Manager
Thanks so much Ross.
This fixed the problem - I just opened the CSV in TextWrangler, copied & pasted it into a new text file, then saved that as CSV, so that Excel didn't have its dirty hands on it.

I also needed to change the file columns to the absolute terminal path... but it's working now!

Cheers,
Rhys
Reply all
Reply to author
Forward
0 new messages