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


Groups > comp.lang.python > #42743 > unrolled thread

Help me with PyCharm on Mac OS

Started byYE SHANG <hendikoy@gmail.com>
First post2013-04-04 01:19 -0700
Last post2013-04-04 07:02 -0700
Articles 4 — 2 participants

Back to article view | Back to comp.lang.python


Contents

  Help me with PyCharm on Mac OS YE SHANG <hendikoy@gmail.com> - 2013-04-04 01:19 -0700
    Re: Help me with PyCharm on Mac OS Dave Angel <davea@davea.name> - 2013-04-04 06:13 -0400
      Re: Help me with PyCharm on Mac OS YE SHANG <hendikoy@gmail.com> - 2013-04-04 07:02 -0700
      Re: Help me with PyCharm on Mac OS YE SHANG <hendikoy@gmail.com> - 2013-04-04 07:02 -0700

#42743 — Help me with PyCharm on Mac OS

FromYE SHANG <hendikoy@gmail.com>
Date2013-04-04 01:19 -0700
SubjectHelp me with PyCharm on Mac OS
Message-ID<43fd272e-1518-4a8c-916c-f9288e3e9949@googlegroups.com>
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.

[toc] | [next] | [standalone]


#42745

FromDave Angel <davea@davea.name>
Date2013-04-04 06:13 -0400
Message-ID<mailman.93.1365070402.3114.python-list@python.org>
In reply to#42743
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

[toc] | [prev] | [next] | [standalone]


#42754

FromYE SHANG <hendikoy@gmail.com>
Date2013-04-04 07:02 -0700
Message-ID<5e77cb8d-fdb4-443b-9b17-83286139dbfc@googlegroups.com>
In reply to#42745
Thank you for your help.

I've figured it out, problem is that I wrote bad options in interpretor options.

在 2013年4月4日星期四UTC+8下午6时13分03秒,Dave Angel写道:
> 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

[toc] | [prev] | [next] | [standalone]


#42755

FromYE SHANG <hendikoy@gmail.com>
Date2013-04-04 07:02 -0700
Message-ID<mailman.102.1365084177.3114.python-list@python.org>
In reply to#42745
Thank you for your help.

I've figured it out, problem is that I wrote bad options in interpretor options.

在 2013年4月4日星期四UTC+8下午6时13分03秒,Dave Angel写道:
> 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

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web