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/

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/

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/

Re: SyntaxError: Non-ASCII character

2016-07-17 Thread Steven D'Aprano
> is probably worse than Python2’s > > Traceback (most recent call last): > File "", line 1, in > File "foo.py", line 31 > SyntaxError: Non-ASCII character '\xe2' in file foo.py on line 31, but no > encoding declared; see http://python.org

Re: SyntaxError: Non-ASCII character

2016-07-17 Thread Rustom Mody
ll last): File "", line 1, in File "/home/ariston/foo.py", line 31 wf = wave.open(“test.wav”, “rb”) ^ SyntaxError: invalid character in identifier is probably worse than Python2’s Traceback (most recent call last): File "", line 1, in

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,

SyntaxError: Non-ASCII character

2016-07-17 Thread ldompeling
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 details Below is the eamplescript. What is wrong with this scrip

Re: Sudden error: SyntaxError: Non-ASCII character '\xc2' in file

2011-03-30 Thread Terry Reedy
On 3/30/2011 7:58 PM, Gnarlodious wrote: On Mar 30, 9:28 am, Peter Otten wrote: You are trying to run your 3.x code with Python 2.x... You're right. Exactly why this started happening I don't know. I believe recent Mac OSX comes with some 2.x installed as the default Python. -- Terry Jan

Re: Sudden error: SyntaxError: Non-ASCII character '\xc2' in file

2011-03-30 Thread Gnarlodious
On Mar 30, 9:28 am, Peter Otten wrote: > You are trying to run your 3.x code with Python 2.x... You're right. Exactly why this started happening I don't know. Thanks. -- Gnarlie -- http://mail.python.org/mailman/listinfo/python-list

Re: Sudden error: SyntaxError: Non-ASCII character '\xc2' in file

2011-03-30 Thread eryksun ()
On Wednesday, March 30, 2011 10:34:46 AM UTC-4, Gnarlodious wrote: > > The error originates at '·' which string contains a · > character. > > Complete error message is: > > SyntaxError: Non-ASCII character '\xc2' in file /Library/WebServer/ > S

Re: Sudden error: SyntaxError: Non-ASCII character '\xc2' in file

2011-03-30 Thread Peter Otten
on 3.1.1 while server is >> running Python 3.1.3. I have not updated anything that should suddenly >> cause this error starting yesterday. >> >> The error originates at '·' which string contains a · >> character. >> >> Complete error message is: >&g

Re: Sudden error: SyntaxError: Non-ASCII character '\xc2' in file

2011-03-30 Thread Peter Otten
uld suddenly > cause this error starting yesterday. > > The error originates at '·' which string contains a · > character. > > Complete error message is: > > SyntaxError: Non-ASCII character '\xc2' in file /Library/WebServer/ > Sites/Sectrum/Si

Re: Sudden error: SyntaxError: Non-ASCII character '\xc2' in file

2011-03-30 Thread Benjamin Kaplan
. I have not updated anything that should suddenly > cause this error starting yesterday. > > The error originates at '·' which string contains a · > character. > > Complete error message is: > > SyntaxError: Non-ASCII character '\xc2' in file /Library/We

Sudden error: SyntaxError: Non-ASCII character '\xc2' in file

2011-03-30 Thread Gnarlodious
yesterday. The error originates at '·' which string contains a · character. Complete error message is: SyntaxError: Non-ASCII character '\xc2' in file /Library/WebServer/ Sites/Sectrum/Site/Feed.py on line 17, but no encoding declared; see http://www.python.org/peps/pep-0263.h

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 consist

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

2007-10-05 Thread Peter Otten
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 translates to '\xc2\