Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'encoding': 0.05; 'newbie': 0.05; 'utf-8': 0.07; 'coding:': 0.09; 'executable': 0.09; 'exit': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python-list': 0.11; 'subject:Help': 0.11; 'python': 0.11; 'project,': 0.12; 'wrote': 0.14; 'windows': 0.15; '.py': 0.16; '2.7.3': 0.16; 'chance?': 0.16; 'gae,': 0.16; 'non-ascii': 0.16; 'reinstalled': 0.16; 'supplied': 0.16; 'syntaxerror:': 0.16; 'there?': 0.16; 'url:peps': 0.16; 'apps': 0.16; 'wrote:': 0.18; 'app': 0.19; 'file,': 0.19; 'finished': 0.19; 'options.': 0.19; 'typing': 0.19; 'thanks.': 0.20; 'help.': 0.21; 'command': 0.22; 'cc:addr:python.org': 0.22; 'this?': 0.23; 'header:User-Agent:1': 0.23; 'error': 0.23; 'script.': 0.24; 'skip:e 30': 0.24; 'fine': 0.24; 'looks': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; "i've": 0.25; 'options': 0.25; 'extension': 0.26; 'skip:" 20': 0.27; 'developing': 0.27; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'specifically': 0.29; 'on,': 0.29; 'am,': 0.29; 'character': 0.29; "i'm": 0.30; 'code': 0.31; 'python2.7': 0.31; 'file': 0.32; 'me?': 0.32; 'supposed': 0.32; 'run': 0.32; 'another': 0.32; 'text': 0.33; 'url:python': 0.33; 'guess': 0.33; 'mac': 0.33; 'maybe': 0.34; 'could': 0.34; 'problem': 0.35; 'subject:with': 0.35; "can't": 0.35; 'received:209.85': 0.35; 'created': 0.35; 'problem.': 0.35; 'something': 0.35; 'anybody': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'google': 0.35; 'add': 0.35; 'there': 0.35; 'ubuntu': 0.36; 'shows': 0.36; 'url:org': 0.36; 'wrong': 0.37; 'so,': 0.37; 'project': 0.37; 'received:209': 0.37; 'thank': 0.38; 'anything': 0.39; 'bad': 0.39; 'launch': 0.39; 'skip:- 60': 0.39; "you're": 0.61; 'telling': 0.64; 'mountain': 0.65; 'details': 0.65; 'below:': 0.68; 'lack': 0.78 X-Received: by 10.182.235.20 with SMTP id ui20mr150213obc.14.1365084169313; Thu, 04 Apr 2013 07:02:49 -0700 (PDT) Newsgroups: comp.lang.python Date: Thu, 4 Apr 2013 07:02:49 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=59.53.120.214; posting-account=6U72DQoAAACPkYKURsEVR8zTOtnrcpa5 References: <43fd272e-1518-4a8c-916c-f9288e3e9949@googlegroups.com> User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 59.53.120.214 MIME-Version: 1.0 Subject: Re: Help me with PyCharm on Mac OS From: YE SHANG To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Message-ID: Lines: 123 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1365084177 news.xs4all.nl 6889 [2001:888:2000:d::a6]:58574 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:42755 Thank you for your help. I've figured it out, problem is that I wrote bad options in interpretor opt= ions. =E5=9C=A8 2013=E5=B9=B44=E6=9C=884=E6=97=A5=E6=98=9F=E6=9C=9F=E5=9B=9BUTC+8= =E4=B8=8B=E5=8D=886=E6=97=B613=E5=88=8603=E7=A7=92=EF=BC=8CDave Angel=E5=86= =99=E9=81=93=EF=BC=9A > On 04/04/2013 04:19 AM, YE SHANG wrote: >=20 > > Hello! >=20 > > >=20 > > I'm a newbie of developing GAE Apps on Mac. >=20 > > >=20 > > My Mac OS is Mountain Lion, I reinstalled python 2.7.3 instead of pre-i= nstalled python 2.7.2, as well as GAE SDK. >=20 > > >=20 > > I finished configuration of Python interpreter(/usr/local/bin/python2.7= ), and Google App Engine(/usr/local/google_appengine). >=20 > > >=20 > > It looks fine until I run the GAE project, there is an error appeared l= ike below: >=20 > > >=20 > > --------------------------------------------------------------- >=20 > > /usr/local/bin/python2.7 /usr/local/bin/pythonw /usr/local/google_appen= gine/dev_appserver.py . >=20 > > File "/usr/local/bin/pythonw", line 1 >=20 > > SyntaxError: Non-ASCII character '\xca' in file /usr/local/bin/pythonw = on line 1, but no encoding declared; see http://www.python.org/peps/pep-026= 3.html for details >=20 > > >=20 > > Process finished with exit code 1 >=20 > > ---------------------------------------------------------------- >=20 > > I can't understand what's going on, I've already add "-*- coding: utf-8= -*-" at the line 1 in main.py. >=20 > > I created another python file and ran it on pycharm, it works well. >=20 > > So I'm just confused what happend with my GAE project. >=20 > > >=20 > > PS: I can run GAE project on GAE launcher, so I guess there must be som= ething wrong with my configuration of pycharm. >=20 > > I used pycharm both on Windows or Ubuntu before, they all functioned we= ll. >=20 > > >=20 > > Can anybody help me? Thanks. >=20 > > >=20 >=20 >=20 > I don't know anything about GAE, but I may be able to point you to the=20 >=20 > problem. >=20 >=20 >=20 > Is /usr/local/bin/pythonw a file you put there? Is it a text file or=20 >=20 > binary? The error message shows that Python thinks it's supposed to be= =20 >=20 > a text file, but the lack of a .py extension makes me suspicious. Could= =20 >=20 > it be an executable supplied by GAE that you're supposed to run instead= =20 >=20 > of python2.7 ? >=20 >=20 >=20 > What command line are you using to launch this? Are you typing >=20 >=20 >=20 > python pythonw >=20 >=20 >=20 > by any chance? If so, you're telling Python to treat it as a text file,= =20 >=20 > specifically as your main script. >=20 >=20 >=20 > Wild guess: maybe GAE wants you to use a command line like: >=20 >=20 >=20 > pythonw main.py >=20 >=20 >=20 >=20 >=20 > --=20 >=20 > DaveA