Bulk Commands with CSV failing

212 views
Skip to first unread message

Karl Hehr

unread,
Jul 9, 2014, 11:41:48 AM7/9/14
to google-ap...@googlegroups.com
Here is the command I am running:

gam csv demouser.csv gam create user ~username firstname ~firstname lastname ~lastname password ~password

Here is the error I am getting:

Traceback (most recent call last):

  File "gam.py", line 7013, in <module>

    for row in input_file:

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/csv.py", line 103, 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?

Jay Lee

unread,
Jul 9, 2014, 1:06:09 PM7/9/14
to google-ap...@googlegroups.com
The error indicates your CSV file may be malformed.


Jay Lee


--
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/0a9ca713-fa5b-473c-86ef-460686cbfff2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Karl Hehr

unread,
Jul 9, 2014, 1:08:46 PM7/9/14
to google-ap...@googlegroups.com
Here is the format of the CSV

username,firstname,lastname,password
bob...@ames.k12.ia.us,Bob,Dole,test
TomFo...@ames.k12.ia.us,Tom,Foolery,test
Clar...@ames.k12.ia.us,Clark,Kent,test

I tried with and without the domain included in the username



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



--
Karl H. Hehr
Technology Director
Ames Community Schools
---------------------------
twitter: karlhehr
skype: karlhehr

David Naylor

unread,
Aug 14, 2014, 5:31:35 PM8/14/14
to google-ap...@googlegroups.com
Were you able to find a fix for this? or did you end up redoing your csv file as Jay suggested?  i am running in to the same issue, same exact error message, and not sure whats wrong with my CSV file, ended up just putting it in a text file and making a while;do;done<file statement


On Wednesday, July 9, 2014 12:08:46 PM UTC-5, Karl Hehr wrote:
Here is the format of the CSV

username,firstname,lastname,password
bob...@ames.k12.ia.us,Bob,Dole,test
TomFo...@ames.k12.ia.us,Tom,Foolery,test
Clar...@ames.k12.ia.us,Clark,Kent,test

I tried with and without the domain included in the username
On Wed, Jul 9, 2014 at 12:05 PM, Jay Lee <jay...@gmail.com> wrote:
The error indicates your CSV file may be malformed.


Jay Lee


On Wed, Jul 9, 2014 at 11:41 AM, Karl Hehr <karl...@ames.k12.ia.us> wrote:
Here is the command I am running:

gam csv demouser.csv gam create user ~username firstname ~firstname lastname ~lastname password ~password

Here is the error I am getting:

Traceback (most recent call last):

  File "gam.py", line 7013, in <module>

    for row in input_file:

  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/csv.py", line 103, 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?

--
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-manager+unsub...@googlegroups.com.

--
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-manager+unsub...@googlegroups.com.

Google Apes Admin

unread,
Mar 6, 2015, 11:03:08 AM3/6/15
to google-ap...@googlegroups.com

You need to save the CSV in windows format. You can do this in Excel by choosing Save As and then under Format choose Windows Comma Separated Values.

Reply all
Reply to author
Forward
0 new messages