Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
312 views
in Technique[技术] by (71.8m points)

python - google app engine: Error: HTTPError

I am trying "Hello world" with python

  import webapp2

class MainHandler(webapp2.RequestHandler):
    def get(self):
        self.response.write('Hello world!')

app = webapp2.WSGIApplication([
    ('/', MainHandler)
], debug=True)

app.yaml

application: engineapp
version: 1
runtime: python27
api_version: 1
threadsafe: yes

handlers:
- url: /favicon.ico
  static_files: favicon.ico
  upload: favicon.ico

- url: .*
  script: main.app

libraries:
- name: webapp2
  version: "2.5.2"

But when run in Google App Launcher get this error

INFO     2013-05-22 12:22:40,302 admin_server.py:117] Starting admin server at: xxxxx:8000
HTTPError()
HTTPError()
Traceback (most recent call last):
  File "C:Program Files (x86)Googlegoogle_app_enginelibcherrypycherrypywsgiserverwsgiserver2.py", line 1302, in communicate
    req.respond()
  File "C:Program Files (x86)Googlegoogle_app_enginelibcherrypycherrypywsgiserverwsgiserver2.py", line 831, in respond
    self.server.gateway(self).respond()
  File "C:Program Files (x86)Googlegoogle_app_enginelibcherrypycherrypywsgiserverwsgiserver2.py", line 2115, in respond
    response = self.req.server.wsgi_app(self.env, self.start_response)
  File "C:Program Files (x86)Googlegoogle_app_enginegoogleappengineoolsdevappserver2wsgi_server.py", line 246, in __call__
    return app(environ, start_response)
  File "C:Program Files (x86)Googlegoogle_app_enginegoogleappengineoolsdevappserver2
equest_rewriter.py", line 311, in _rewriter_middleware
    response_body = iter(application(environ, wrapped_start_response))
  File "C:Program Files (x86)Googlegoogle_app_enginegoogleappengineoolsdevappserver2python
equest_handler.py", line 89, in __call__
    self._flush_logs(response.get('logs', []))
  File "C:Program Files (x86)Googlegoogle_app_enginegoogleappengineoolsdevappserver2python
equest_handler.py", line 220, in _flush_logs
    apiproxy_stub_map.MakeSyncCall('logservice', 'Flush', request, response)
  File "C:Program Files (x86)Googlegoogle_app_enginegoogleappengineapiapiproxy_stub_map.py", line 94, in MakeSyncCall
    return stubmap.MakeSyncCall(service, call, request, response)
  File "C:Program Files (x86)Googlegoogle_app_enginegoogleappengineapiapiproxy_stub_map.py", line 320, in MakeSyncCall
    rpc.CheckSuccess()
  File "C:Program Files (x86)Googlegoogle_app_enginegoogleappengineapiapiproxy_rpc.py", line 156, in _WaitImpl
    self.request, self.response)
  File "C:Program Files (x86)Googlegoogle_app_enginegoogleappengineext
emote_api
emote_api_stub.py", line 200, in MakeSyncCall
    self._MakeRealSyncCall(service, call, request, response)
  File "C:Program Files (x86)Googlegoogle_app_enginegoogleappengineext
emote_api
emote_api_stub.py", line 226, in _MakeRealSyncCall
    encoded_response = self._server.Send(self._path, encoded_request)
  File "C:Program Files (x86)Googlegoogle_app_enginegoogleappengineoolsappengine_rpc.py", line 393, in Send
    f = self.opener.open(req)
  File "C:Python27liburllib2.py", line 410, in open
    response = meth(req, response)
  File "C:Python27liburllib2.py", line 523, in http_response
    'http', request, response, code, msg, hdrs)
  File "C:Python27liburllib2.py", line 448, in error
    return self._call_chain(*args)
  File "C:Python27liburllib2.py", line 382, in _call_chain
    result = func(*args)
  File "C:Python27liburllib2.py", line 531, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 503: Service Unavailable

I change GAE Launcher(1.7.7) version and reinstall python but does not work

I'm using Windows 7, python 2.7 and EAG Launcher 1.8.0

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...