Path: csiph.com!usenet.pasdenom.info!news.etla.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.001 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; 'subject:Help': 0.11; 'python': 0.11; 'project,': 0.12; '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; 'typing': 0.19; 'thanks.': 0.20; 'command': 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; "i've": 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; 'subject:with': 0.35; "can't": 0.35; 'created': 0.35; 'problem.': 0.35; 'something': 0.35; 'anybody': 0.35; 'but': 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; 'to:addr:python-list': 0.38; 'anything': 0.39; 'launch': 0.39; 'to:addr:python.org': 0.39; 'skip:- 60': 0.39; "you're": 0.61; 'telling': 0.64; 'mountain': 0.65; 'details': 0.65; 'received:74.208': 0.68; 'below:': 0.68; 'lack': 0.78; 'received:74.208.4.194': 0.84 Date: Thu, 04 Apr 2013 06:13:03 -0400 From: Dave Angel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Help me with PyCharm on Mac OS References: <43fd272e-1518-4a8c-916c-f9288e3e9949@googlegroups.com> In-Reply-To: <43fd272e-1518-4a8c-916c-f9288e3e9949@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:AUKhbf7Rhhu9xDfqhV0Cvf9EROkrJWNGkWrOg9AuJVj wzguuxiQOF09fg3KSmAelFyhbsrWyepYlCTfGSvcDKqHYneQFR pN/+D9lAN6bojYPrv5P2I+hNu1LkV064yoR+ZNN2mtPAwo8QF5 1szIx4mcaj5mHrqUWIvrYzWxgHJklmAPQ0bAgFdq9oCiKFByuX g2IIaRw4Fvg2c7KkLvy7ks84qMYLj2OnzUEpwRVVxXGH1jS8/R trtn37HeHAVaIe+DrZegERGC2yHAczIb6csZNfF8GgpXJHEraM GEY0y+s21LHW2Tcahd1l0Dmz+cNBuqC2tJeWasmHSuGPc9wYA= = 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: , Newsgroups: comp.lang.python Message-ID: Lines: 51 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1365070402 news.xs4all.nl 6861 [2001:888:2000:d::a6]:53683 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:42745 On 04/04/2013 04:19 AM, YE SHANG wrote: > Hello! > > I'm a newbie of developing GAE Apps on Mac. > > My Mac OS is Mountain Lion, I reinstalled python 2.7.3 instead of pre-installed python 2.7.2, as well as GAE SDK. > > I finished configuration of Python interpreter(/usr/local/bin/python2.7), and Google App Engine(/usr/local/google_appengine). > > It looks fine until I run the GAE project, there is an error appeared like below: > > --------------------------------------------------------------- > /usr/local/bin/python2.7 /usr/local/bin/pythonw /usr/local/google_appengine/dev_appserver.py . > File "/usr/local/bin/pythonw", line 1 > 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-0263.html for details > > Process finished with exit code 1 > ---------------------------------------------------------------- > I can't understand what's going on, I've already add "-*- coding: utf-8 -*-" at the line 1 in main.py. > I created another python file and ran it on pycharm, it works well. > So I'm just confused what happend with my GAE project. > > PS: I can run GAE project on GAE launcher, so I guess there must be something wrong with my configuration of pycharm. > I used pycharm both on Windows or Ubuntu before, they all functioned well. > > Can anybody help me? Thanks. > I don't know anything about GAE, but I may be able to point you to the problem. Is /usr/local/bin/pythonw a file you put there? Is it a text file or binary? The error message shows that Python thinks it's supposed to be a text file, but the lack of a .py extension makes me suspicious. Could it be an executable supplied by GAE that you're supposed to run instead of python2.7 ? What command line are you using to launch this? Are you typing python pythonw by any chance? If so, you're telling Python to treat it as a text file, specifically as your main script. Wild guess: maybe GAE wants you to use a command line like: pythonw main.py -- DaveA