SyntaxError: Non-ASCII character

201 views
Skip to first unread message

Ced Paine

unread,
Jul 1, 2018, 8:47:22 AM7/1/18
to GAM for G Suite

GAM 4.40

Python 2.7.14 64-bit final

google-api-python-client 1.6.4

oauth2client 4.1.2

Darwin-17.5.0-x86_64-i386-64bit x86_64 (Mac OS 10.13.4)


When attempting to run any GAM command, I get the following error message:


File "/Users/cpaine/bin/gam/gam", line 1

SyntaxError: Non-ASCII character '\xcf' in file /Users/cpaine/bin/gam/gam on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details


I got this message when I first installed GAM on my new MacBook, but reinstalling seemed to resolve the issue and it worked for several weeks. Now issue has returned and reinstalling no longer resolves it. Any advice will be much appreciated.

Jay Lee

unread,
Jul 1, 2018, 8:49:29 AM7/1/18
to google-ap...@googlegroups.com
What command are you running? You have a compiled Gam binary installed that has Python wrapped in it so you should not be including python as part of your command.

Jay

--
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/6b337ea2-b85f-4602-8821-429b9a746fab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ced Paine

unread,
Jul 1, 2018, 10:40:56 AM7/1/18
to GAM for G Suite
Aha! I was calling my own Python ("alias gam='python ~/bin/gam/gam'"), as I was used to doing on my last computer with an older version of GAM. Changing that to "alias gam=~/bin/gam/gam'" did the trick. Thanks!

Ced

On Sunday, July 1, 2018 at 8:49:29 AM UTC-4, Jay Lee wrote:
What command are you running? You have a compiled Gam binary installed that has Python wrapped in it so you should not be including python as part of your command.

Jay

On Sun, Jul 1, 2018, 8:47 AM Ced Paine <cpa...@fessenden.org> wrote:

GAM 4.40

Python 2.7.14 64-bit final

google-api-python-client 1.6.4

oauth2client 4.1.2

Darwin-17.5.0-x86_64-i386-64bit x86_64 (Mac OS 10.13.4)


When attempting to run any GAM command, I get the following error message:


File "/Users/cpaine/bin/gam/gam", line 1

SyntaxError: Non-ASCII character '\xcf' in file /Users/cpaine/bin/gam/gam on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details


I got this message when I first installed GAM on my new MacBook, but reinstalling seemed to resolve the issue and it worked for several weeks. Now issue has returned and reinstalling no longer resolves it. Any advice will be much appreciated.

--
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-manager+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages