multiprocess csv: UnicodeDecodeError

134 views
Skip to first unread message

William Yox

unread,
May 1, 2023, 1:39:26 PM5/1/23
to GAM for Google Workspace
I am trying to output a list of drive files using a second csv as input.

gam redirect csv ./files.csv multiprocess csv .\2010-2015.csv gam user ~id print filelist fields name,id  (the email field is 'id')

Using a different csv, this same command worked without issue.  I received the following:

Traceback (most recent call last):
  File "__init__.py", line 68726, in ProcessGAMCommand
  File "__init__.py", line 9694, in doCSV
  File "csv.py", line 111, in __next__
  File "<frozen codecs>", line 322, in decode
  File "encodings\utf_8_sig.py", line 69, in _buffer_decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 2323: invalid continuation byte

I thought something might be wrong with the input csv, but it was generated using the same mechanism as the working one.

Cheers,
Bill

Ross Scroggs

unread,
May 1, 2023, 1:48:48 PM5/1/23
to google-ap...@googlegroups.com
Bill,

Are you on a PC? How was .\2010-2015.csv generated? It has a non UTF-8 character in it.
Try:
gam redirect csv ./files.csv multiprocess csv .\2010-2015.csv charset latin1 gam user ~id print filelist fields name,id 

Ross

--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/044b8a6c-a0c7-4b2d-b320-61894c9ee40cn%40googlegroups.com.


--

William Yox

unread,
May 1, 2023, 1:55:37 PM5/1/23
to GAM for Google Workspace
I am on a Windows machine. I'll give that a try and see what happens. 

William Yox

unread,
May 1, 2023, 2:11:02 PM5/1/23
to GAM for Google Workspace
That does work, thanks Ross. 

I used Powershell's New-Item cmdlet to create a csv, but the file is not utf8. I'll fix that. Thanks!
Reply all
Reply to author
Forward
0 new messages