UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode

399 views
Skip to first unread message

+KimNilsson

unread,
Aug 18, 2018, 5:42:39 AM8/18/18
to GAM for G Suite
Ross :-/

$ gamx update cros query:id:5CD8249V9W ou '/Personal/Förskolor/Lerviks förskola'
Getting all CrOS Devices that match query (id:5CD8249V9W), may take some time on a large G Suite Account...
Got 1 CrOS Device...
Got 1 CrOS Device that matched query (id:5CD8249V9W)
Organizational Unit: /Personal/Förskolor/Lerviks förskola, Add 1 CrOS Device
/tmp/_MEIo9N3o8/urllib.py:1299: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
Traceback (most recent call last):
  File "gam.py", line 32983, in ProcessGAMCommand
  File "gam.py", line 11440, in doUpdateCrOSDevices
  File "gam.py", line 11418, in updateCrOSDevices
  File "gam.py", line 8206, in _batchMoveCrOSesToOrgUnit
  File "gam.py", line 366, in executeBatch
  File "oauth2client/util.py", line 137, in positional_wrapper
  File "googleapiclient/http.py", line 1433, in execute
  File "googleapiclient/http.py", line 1347, in _execute
  File "googleapiclient/http.py", line 1173, in _id_to_header
  File "urllib.py", line 1299, in quote
KeyError: u'\xf6'

I get the same error no matter if I run it manually, like this, or from a CSV, with or without the charset utf-8 option. I tried the other charset options too, but neither worked.
It really doesn't like that I have the ö character in my OU path.

I don't know if this is related to the previous issue with åäöÅÄÖé chars in files/folders, but I recently received an update that that particular bug is still alive.
https://issuetracker.google.com/issues/64468406

If I just use a different path, without any of the åäöé characters, it works fine. But, I, of course, need to put the devices where they belong, and we use all of them characters in our OUs, since that's the names of our schools.

Ross Scroggs

unread,
Aug 18, 2018, 10:09:05 AM8/18/18
to google-ap...@googlegroups.com
Kim,

I'm working on it.

--
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-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/8bb2b2ed-c5c0-43f6-8462-1eb0c9b30f62%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ross Scroggs

unread,
Aug 18, 2018, 10:17:56 AM8/18/18
to google-ap...@googlegroups.com
Kim,

Here's a short-term fix:
$ gamx update cros query:id:5CD8249V9W ou '/Personal/Förskolor/Lerviks förskola' quickcrosmove

Ross

On Aug 18, 2018, at 2:42 AM, +KimNilsson <there.is.no...@gmail.com> wrote:

Kim Nilsson

unread,
Aug 18, 2018, 11:03:09 AM8/18/18
to Google Apps Manager
Yeah, quickcrosmove didn't complain.
All devices moved.

/Kim
--
There is No Substitute!

Ross Scroggs

unread,
Aug 18, 2018, 11:59:27 AM8/18/18
to google-ap...@googlegroups.com
Kim,

Fixed in 4.60.06.

On Aug 18, 2018, at 2:42 AM, +KimNilsson <there.is.no...@gmail.com> wrote:

+KimNilsson

unread,
Aug 20, 2018, 9:35:32 AM8/20/18
to GAM for G Suite
Worked like a charm, thanks!
Reply all
Reply to author
Forward
0 new messages