Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #111562

Re: SyntaxError: Non-ASCII character

From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Subject Re: SyntaxError: Non-ASCII character
Date 2016-07-17 19:26 +1000
Message-ID <mailman.62.1468747601.2307.python-list@python.org> (permalink)
References <b804e2c1-bf9c-44fc-8c8e-6616489aa8ba@googlegroups.com> <CAPTjJmom5p3YVMiGagOddBHitEcp8PHWEkLxKDi72f9-rVe3rQ@mail.gmail.com>

Show all headers | View raw


On Sun, Jul 17, 2016 at 7:19 PM,  <ldompeling@casema.nl> 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, it'll often show you
problems before they happen.

Also, recommendation: Use Python 3, not Python 2. Your code looks like
it's intended for Py3, but your error says that you ran it under Py2.
The solution may be as simple as running "python3 script.py" rather
than "python script.py".

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

SyntaxError: Non-ASCII character ldompeling@casema.nl - 2016-07-17 02:19 -0700
  Re: SyntaxError: Non-ASCII character Chris Angelico <rosuav@gmail.com> - 2016-07-17 19:26 +1000
    Re: SyntaxError: Non-ASCII character Rustom Mody <rustompmody@gmail.com> - 2016-07-17 02:57 -0700
      Re: SyntaxError: Non-ASCII character Steven D'Aprano <steve@pearwood.info> - 2016-07-17 21:01 +1000
  Re: SyntaxError: Non-ASCII character ldompeling@casema.nl - 2016-07-17 05:01 -0700
    Re: SyntaxError: Non-ASCII character Chris Angelico <rosuav@gmail.com> - 2016-07-17 22:11 +1000
    Re: SyntaxError: Non-ASCII character Steven D'Aprano <steve@pearwood.info> - 2016-07-18 00:49 +1000
    Re: SyntaxError: Non-ASCII character Wildman <best_lay@yahoo.com> - 2016-07-17 11:07 -0500
  Re: SyntaxError: Non-ASCII character ldompeling@casema.nl - 2016-07-17 06:35 -0700
    Re: SyntaxError: Non-ASCII character Steven D'Aprano <steve@pearwood.info> - 2016-07-18 00:50 +1000
  Re: SyntaxError: Non-ASCII character ldompeling@casema.nl - 2016-07-17 09:27 -0700

csiph-web