Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #111562
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: SyntaxError: Non-ASCII character |
| Date | Sun, 17 Jul 2016 19:26:38 +1000 |
| Lines | 16 |
| Message-ID | <mailman.62.1468747601.2307.python-list@python.org> (permalink) |
| References | <b804e2c1-bf9c-44fc-8c8e-6616489aa8ba@googlegroups.com> <CAPTjJmom5p3YVMiGagOddBHitEcp8PHWEkLxKDi72f9-rVe3rQ@mail.gmail.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | quoted-printable |
| X-Trace | news.uni-berlin.de lIe9MUvKj8IvhOKyJ+HIrgOgZ4CVqswnSX5ILhqYhQ8Q== |
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.023 |
| X-Spam-Evidence | '*H*': 0.95; '*S*': 0.00; 'happen.': 0.09; 'python': 0.10; '"this': 0.13; '"python': 0.16; '2016': 0.16; 'editor,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'processor,': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:Non': 0.16; 'wrote:': 0.16; 'to:name:python- list@python.org': 0.20; 'code.': 0.23; 'header:In-Reply-To:1': 0.24; 'sort': 0.25; 'error': 0.27; 'message-id:@mail.gmail.com': 0.27; 'looks': 0.29; 'code': 0.30; 'says': 0.32; 'running': 0.34; 'received:google.com': 0.35; 'but': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'subject:-': 0.39; 'rather': 0.39; 'to:addr:python.org': 0.40; 'your': 0.60; 'show': 0.62; 'watch': 0.62; 'flat': 0.63; 'jul': 0.72; '8bit%:24': 0.84; 'chrisa': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-transfer-encoding; bh=wWcnkYup0jxUekK0cIeRa6eY31tIz3IGgWPX9mOHFvo=; b=pHsIyqa+I6+UsvYaSpaVJ0z6E15nlQ1C4Ixb1hL6YUVRfskYZNcuyjOmTlY8sDIkJX YHiVp/7YAY0mQBjpksQ1bnvYOnAtjRNJ+bEs2lS2ZYgCEcWedd77wTEJ0d4CEAdonKdf njxg6PgJFFrXYIpOV/K5xFCaxXs+SCoAe+CGKA1egbUuIqQvjQ9zFBP9YZqxn4ARS+G7 lMlWVhs/Z+pHTZpLuXyWmUUl9EiDSFOZ5szjn4nX5WkyGAtX0cyAaYQn53y04ujkG9jC RPfG5Jw2ziNAHn6m228hpHKFu7SN1anzhOoxDBFa8nb23JP0gotLua3YZVR1vsnSCPyp yksg== |
| X-Google-DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-transfer-encoding; bh=wWcnkYup0jxUekK0cIeRa6eY31tIz3IGgWPX9mOHFvo=; b=DqnYW6MyASajfUnK40XwD6uBcv02LGuRt6bDnWqo+cEKgJlDluSsVe1CfDFy/Iu7iO WRuje0b/SZEqfEGlWkrRirI/yCe7C0b5FwYhaLqBiVWkY7WmNiSE1i2M+ehJk0ahT6uy +mTrCDwyo1X666d6BS4c/5+1J1AyaNV0R100tBuOoOFsQr5kbToL+A5K5kHPpM+Mjbbo 97NVzmWGouE/BfdF8izXcEKyY80Icu2NuHaUJkE0MxL0LQ8Yw/ykscak/ksvtOkKUIqb AlZ4YUkI3sVcrDZNASur6gF64JLZS9No4/upEfBjj0X42jJn35x3eIrIjtB9mV0IRqo9 Ijpg== |
| X-Gm-Message-State | ALyK8tILQOstdEoGB8Ui9aAHRmqcRW9Ontoupb85a3ltNI5ZnRfjRdSshb/E3BH3vz3wEQ9WKvkz81XxGhssxg== |
| X-Received | by 10.28.87.3 with SMTP id l3mr48739697wmb.71.1468747599136; Sun, 17 Jul 2016 02:26:39 -0700 (PDT) |
| In-Reply-To | <b804e2c1-bf9c-44fc-8c8e-6616489aa8ba@googlegroups.com> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.22 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| X-Mailman-Original-Message-ID | <CAPTjJmom5p3YVMiGagOddBHitEcp8PHWEkLxKDi72f9-rVe3rQ@mail.gmail.com> |
| X-Mailman-Original-References | <b804e2c1-bf9c-44fc-8c8e-6616489aa8ba@googlegroups.com> |
| Xref | csiph.com comp.lang.python:111562 |
Show key headers only | 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 | Next — Previous in thread | Next in thread | Find similar | Unroll 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