Re: SyntaxError: Non-ASCII character

2016-07-17 Thread ldompeling
Op zondag 17 juli 2016 11:19:32 UTC+2 schreef ldomp...@casema.nl: > I copy this script from the magpi but when I run this script I get this > error: > SyntaxError: Non-ASCII character '\xe2' in file sound.py on line 32, but no > encoding declared; see http://python.org/dev/peps/pep-0263/ for det

Re: SyntaxError: Non-ASCII character

2016-07-17 Thread Wildman via Python-list
On Sun, 17 Jul 2016 05:01:21 -0700, ldompeling wrote: > I installed python 3.4 and set my python path to PYTONPATH:/usr/bin/python3.4 > > When I try to import pyaudio then I get this error: > Python 3.4.2 (default, Oct 19 2014, 13:31:11) > [GCC 4.9.1] on linux > Type "help", "copyright", "credits

Re: SyntaxError: Non-ASCII character

2016-07-17 Thread Steven D'Aprano
On Sun, 17 Jul 2016 11:35 pm, ldompel...@casema.nl wrote: > I also get a lot off alsa errors on my screen so I don't no if that result > in this error: > > Traceback (most recent call last): > File "sound.py", line 19, in > rate=RATE, input=TRUE, frames_per_buffer=CHUNK) > NameError: name 'TRUE'

Re: SyntaxError: Non-ASCII character

2016-07-17 Thread Steven D'Aprano
On Sun, 17 Jul 2016 10:01 pm, ldompel...@casema.nl wrote: > I installed python 3.4 and set my python path to > PYTONPATH:/usr/bin/python3.4 > > When I try to import pyaudio then I get this error: > Python 3.4.2 (default, Oct 19 2014, 13:31:11) > [GCC 4.9.1] on linux > Type "help", "copyright", "c

Re: SyntaxError: Non-ASCII character

2016-07-17 Thread ldompeling
Op zondag 17 juli 2016 11:19:32 UTC+2 schreef ldomp...@casema.nl: > I copy this script from the magpi but when I run this script I get this > error: > SyntaxError: Non-ASCII character '\xe2' in file sound.py on line 32, but no > encoding declared; see http://python.org/dev/peps/pep-0263/ for det

Re: SyntaxError: Non-ASCII character

2016-07-17 Thread Chris Angelico
On Sun, Jul 17, 2016 at 10:01 PM, wrote: > I installed python 3.4 and set my python path to PYTONPATH:/usr/bin/python3.4 > > When I try to import pyaudio then I get this error: > Python 3.4.2 (default, Oct 19 2014, 13:31:11) > [GCC 4.9.1] on linux > Type "help", "copyright", "credits" or "license

Re: SyntaxError: Non-ASCII character

2016-07-17 Thread ldompeling
Op zondag 17 juli 2016 11:19:32 UTC+2 schreef ldomp...@casema.nl: > I copy this script from the magpi but when I run this script I get this > error: > SyntaxError: Non-ASCII character '\xe2' in file sound.py on line 32, but no > encoding declared; see http://python.org/dev/peps/pep-0263/ for det

Re: SyntaxError: Non-ASCII character

2016-07-17 Thread Steven D'Aprano
On Sun, 17 Jul 2016 07:57 pm, Rustom Mody wrote: > I dare say that Python3’s : > Traceback (most recent call last): > File "", line 1, in > File "/home/ariston/foo.py", line 31 > wf = wave.open(“test.wav”, “rb”) >^ > SyntaxError: invalid character in identifier If

Re: SyntaxError: Non-ASCII character

2016-07-17 Thread Rustom Mody
On Sunday, July 17, 2016 at 2:56:53 PM UTC+5:30, Chris Angelico wrote: > On Sun, Jul 17, 2016 at 7:19 PM, wrote: > > wf = wave.open(“test.wav”, “rb”) > > Watch your quotes. They want to be flat quotes, U+0022 "this sort", > not any sort of typographical quote. > > Recommendation: Use a programm

Re: SyntaxError: Non-ASCII character

2016-07-17 Thread Chris Angelico
On Sun, Jul 17, 2016 at 7:19 PM, wrote: > wf = wave.open(“test.wav”, “rb”) Watch your quotes. They want to be flat quotes, U+0022 "this sort", not any sort of typographical quote. Recommendation: Use a programmer's editor, not a word processor, for working with code. As well as not mangling it,

Re: "SyntaxError: Non-ASCII character '\xc2'...", was Re: Is there a nicer way to do this?

2007-10-05 Thread Victor B. Gonzalez
On Friday 05 October 2007 3:33:43 am Peter Otten wrote: > Victor B. Gonzalez wrote: > > anyhow, I keep getting "SyntaxError: Non-ASCII character '\xc2'..." on > > line 5. anyone know what this is? > > I too had that problem with KNode. Leading space consists of NO-BREAK SPACE > (unichr(160)) which