Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: SyntaxError: Non-ASCII character Date: Sun, 17 Jul 2016 19:26:38 +1000 Lines: 16 Message-ID: References: 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: 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: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: Xref: csiph.com comp.lang.python:111562 On Sun, Jul 17, 2016 at 7:19 PM, wrote: > wf =3D wave.open(=E2=80=9Ctest.wav=E2=80=9D, =E2=80=9Crb=E2=80=9D) 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