Related
I'm running into a 404 error (in the console) and 500 error (in the browser) when I'm simply trying to run this AppEngine tutorial
https://cloud.google.com/appengine/docs/standard/python/getting-started/python-standard-env
I followed the whole tutorial, copying the latest files from github, and am trying to run it in the local env.
dev_appserver.py --port=8080 --enable_console=yes app.yaml
When I try to browse to http://localhost:8080
In the console, I get
HTTPError()
HTTPError()
Traceback (most recent call last):
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\lib
\cherrypy\cherrypy\wsgiserver\wsgiserver2.py", line 1302, in communicate
req.respond()
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\lib
\cherrypy\cherrypy\wsgiserver\wsgiserver2.py", line 831, in respond
self.server.gateway(self).respond()
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\lib
\cherrypy\cherrypy\wsgiserver\wsgiserver2.py", line 2115, in respond
response = self.req.server.wsgi_app(self.env, self.start_response)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\devappserver2\wsgi_server.py", line 292, in __call__
return app(environ, start_response)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\devappserver2\request_rewriter.py", line 314, in _rewriter_m
iddleware
response_body = iter(application(environ, wrapped_start_response))
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\devappserver2\python\runtime\request_handler.py", line 165,
in __call__
self._flush_logs(response.get('logs', []))
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\devappserver2\python\runtime\request_handler.py", line 308,
in _flush_logs
apiproxy_stub_map.MakeSyncCall('logservice', 'Flush', request, response)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\api\apiproxy_stub_map.py", line 97, in MakeSyncCall
return stubmap.MakeSyncCall(service, call, request, response)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\api\apiproxy_stub_map.py", line 331, in MakeSyncCall
rpc.CheckSuccess()
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\api\apiproxy_rpc.py", line 136, in CheckSuccess
self._traceback)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\api\apiproxy_rpc.py", line 161, in _WaitImpl
self.request, self.response)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\ext\remote_api\remote_api_stub.py", line 223, in MakeSyncCall
self._MakeRealSyncCall(service, call, request, response)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\ext\remote_api\remote_api_stub.py", line 248, in _MakeRealSyncCall
encoded_response = self._server.Send(self._path, encoded_request)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\appengine_rpc.py", line 485, in Send
self._Authenticate()
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\appengine_rpc.py", line 631, in _Authenticate
super(HttpRpcServer, self)._Authenticate()
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\appengine_rpc.py", line 369, in _Authenticate
auth_token = self._GetAuthToken(credentials[0], credentials[1])
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\appengine_rpc.py", line 308, in _GetAuthToken
response = self.opener.open(req)
File "C:\Python27\lib\urllib2.py", line 435, in open
response = meth(req, response)
File "C:\Python27\lib\urllib2.py", line 548, in http_response
'http', request, response, code, msg, hdrs)
File "C:\Python27\lib\urllib2.py", line 473, in error
return self._call_chain(*args)
File "C:\Python27\lib\urllib2.py", line 407, in _call_chain
result = func(*args)
File "C:\Python27\lib\urllib2.py", line 556, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 404: Not Found
INFO 2019-04-18 09:56:39,905 module.py:861] default: "GET /form HTTP/1.1" 50
0 -
Traceback (most recent call last):
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\lib
\cherrypy\cherrypy\wsgiserver\wsgiserver2.py", line 1302, in communicate
req.respond()
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\lib
\cherrypy\cherrypy\wsgiserver\wsgiserver2.py", line 831, in respond
self.server.gateway(self).respond()
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\lib
\cherrypy\cherrypy\wsgiserver\wsgiserver2.py", line 2115, in respond
response = self.req.server.wsgi_app(self.env, self.start_response)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\devappserver2\wsgi_server.py", line 292, in __call__
return app(environ, start_response)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\devappserver2\request_rewriter.py", line 314, in _rewriter_m
iddleware
response_body = iter(application(environ, wrapped_start_response))
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\devappserver2\python\runtime\request_handler.py", line 165,
in __call__
self._flush_logs(response.get('logs', []))
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\devappserver2\python\runtime\request_handler.py", line 308,
in _flush_logs
apiproxy_stub_map.MakeSyncCall('logservice', 'Flush', request, response)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\api\apiproxy_stub_map.py", line 97, in MakeSyncCall
return stubmap.MakeSyncCall(service, call, request, response)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\api\apiproxy_stub_map.py", line 331, in MakeSyncCall
rpc.CheckSuccess()
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\api\apiproxy_rpc.py", line 136, in CheckSuccess
self._traceback)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\api\apiproxy_rpc.py", line 161, in _WaitImpl
self.request, self.response)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\ext\remote_api\remote_api_stub.py", line 223, in MakeSyncCall
self._MakeRealSyncCall(service, call, request, response)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\ext\remote_api\remote_api_stub.py", line 248, in _MakeRealSyncCall
encoded_response = self._server.Send(self._path, encoded_request)
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\appengine_rpc.py", line 485, in Send
self._Authenticate()
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\appengine_rpc.py", line 631, in _Authenticate
super(HttpRpcServer, self)._Authenticate()
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\appengine_rpc.py", line 369, in _Authenticate
auth_token = self._GetAuthToken(credentials[0], credentials[1])
File "C:\googlecloudsdk\install\google-cloud-sdk\platform\google_appengine\goo
gle\appengine\tools\appengine_rpc.py", line 308, in _GetAuthToken
response = self.opener.open(req)
File "C:\Python27\lib\urllib2.py", line 435, in open
response = meth(req, response)
File "C:\Python27\lib\urllib2.py", line 548, in http_response
'http', request, response, code, msg, hdrs)
File "C:\Python27\lib\urllib2.py", line 473, in error
return self._call_chain(*args)
File "C:\Python27\lib\urllib2.py", line 407, in _call_chain
result = func(*args)
File "C:\Python27\lib\urllib2.py", line 556, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 404: Not Found
In the browser, I get
localhost is currently unable to handle this request.
HTTP ERROR 500
I've found some posts with similar symptoms, but not exact. And none of the solutions suggested fix the issue.
Tried:
- Specifying the port 8080 in the dev_appserver.
- Ensuring ASP.NET framework was installed.
- Turning on IIS.
- Ensuring SDK is latest version.
This is also just straight from Google's tutorial.
Anybody have any insight/ideas?
HTTPError: HTTP Error 404: Not Found INFO 2019-04-18 09:56:39,905
module.py:861] default: "GET /form HTTP/1.1" 500
this line jumps out. Are you sure you followed step 2 here and step 4 here?
If you are, can you run the command below in the project directory and provide the output? (Don't forget to remove PII/SPI)
dir . /s /b sortorder:N
I have been trying to run a small app using google app engine (python) on 8080. I am behind my college proxy which requires a username and password to login
here is what i get
INFO 2013-12-22 10:16:19,516 sdk_update_checker.py:245] Checking for updates to the SDK.
INFO 2013-12-22 10:16:19,518 init.py:94] Connecting through tunnel to: appengine.google.com:443
INFO 2013-12-22 10:16:19,525 sdk_update_checker.py:261] Update check failed:
WARNING 2013-12-22 10:16:19,527 api_server.py:331] Could not initialize images API; you are likely missing the Python "PIL" module.
INFO 2013-12-22 10:16:19,529 api_server.py:138] Starting API server at: >localhost:35152
INFO 2013-12-22 10:16:19,545 dispatcher.py:171] Starting module "default" running at: >localhost:8080
INFO 2013-12-22 10:16:19,552 admin_server.py:117] Starting admin server at: >localhost:8000
but when i go to my browser to go to 8080...i get:
HTTPError()
HTTPError()
Traceback (most recent call last):
File "/home/yash/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 1302, in communicate
req.respond()
File "/home/yash/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 831, in respond
self.server.gateway(self).respond()
File "/home/yash/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 2115, in respond
response = self.req.server.wsgi_app(self.env, self.start_response)
File "/home/yash/google_appengine/google/appengine/tools/devappserver2/wsgi_server.py", line 269, in call
return app(environ, start_response)
File "/home/yash/google_appengine/google/appengine/tools/devappserver2/request_rewriter.py", line 311, in _rewriter_middleware
response_body = iter(application(environ, wrapped_start_response))
INFO 2013-12-22 10:22:05,095 module.py:617] default: "GET / HTTP/1.1" 500 -
File "/home/yash/google_appengine/google/appengine/tools/devappserver2/python/request_handler.py", line 148, in call
self._flush_logs(response.get('logs', []))
File "/home/yash/google_appengine/google/appengine/tools/devappserver2/python/request_handler.py", line 284, in _flush_logs
apiproxy_stub_map.MakeSyncCall('logservice', 'Flush', request, response)
File "/home/yash/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 94, in MakeSyncCall
return stubmap.MakeSyncCall(service, call, request, response)
File "/home/yash/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 328, in MakeSyncCall
rpc.CheckSuccess()
File "/home/yash/google_appengine/google/appengine/api/apiproxy_rpc.py", line 156, in _WaitImpl
self.request, self.response)
File "/home/yash/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 200, in MakeSyncCall
self._MakeRealSyncCall(service, call, request, response)
File "/home/yash/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 226, in _MakeRealSyncCall
encoded_response = self._server.Send(self._path, encoded_request)
File "/home/yash/google_appengine/google/appengine/tools/appengine_rpc.py", line 409, in Send
f = self.opener.open(req)
File "/usr/local/lib/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/usr/local/lib/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/local/lib/python2.7/urllib2.py", line 448, in error
return self._call_chain(*args)
File "/usr/local/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/usr/local/lib/python2.7/urllib2.py", line 531, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 403: Forbidden
Traceback (most recent call last):
File "/home/yash/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 1302, in communicate
req.respond()
File "/home/yash/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 831, in respond
self.server.gateway(self).respond()
File "/home/yash/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 2115, in respond
response = self.req.server.wsgi_app(self.env, self.start_response)
File "/home/yash/google_appengine/google/appengine/tools/devappserver2/wsgi_server.py", line 269, in call
return app(environ, start_response)
File "/home/yash/google_appengine/google/appengine/tools/devappserver2/request_rewriter.py", line 311, in _rewriter_middleware
response_body = iter(application(environ, wrapped_start_response))
File "/home/yash/google_appengine/google/appengine/tools/devappserver2/python/request_handler.py", line 148, in call
self._flush_logs(response.get('logs', []))
File "/home/yash/google_appengine/google/appengine/tools/devappserver2/python/request_handler.py", line 284, in _flush_logs
apiproxy_stub_map.MakeSyncCall('logservice', 'Flush', request, response)
File "/home/yash/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 94, in MakeSyncCall
return stubmap.MakeSyncCall(service, call, request, response)
File "/home/yash/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 328, in MakeSyncCall
rpc.CheckSuccess()
File "/home/yash/google_appengine/google/appengine/api/apiproxy_rpc.py", line 156, in _WaitImpl
self.request, self.response)
File "/home/yash/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 200, in MakeSyncCall
self._MakeRealSyncCall(service, call, request, response)
File "/home/yash/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 226, in _MakeRealSyncCall
encoded_response = self._server.Send(self._path, encoded_request)
File "/home/yash/google_appengine/google/appengine/tools/appengine_rpc.py", line 409, in Send
f = self.opener.open(req)
File "/usr/local/lib/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/usr/local/lib/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/local/lib/python2.7/urllib2.py", line 448, in error
return self._call_chain(*args)
File "/usr/local/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/usr/local/lib/python2.7/urllib2.py", line 531, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 403: Forbidden
HTTPError()
HTTPError()
Traceback (most recent call last):
File "/home/yash/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 1302, in communicate
req.respond()
File "/home/yash/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 831, in respond
self.server.gateway(self).respond()
File "/home/yash/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 2115, in respond
response = self.req.server.wsgi_app(self.env, self.start_response)
File "/home/yash/google_appengine/google/appengine/tools/devappserver2/wsgi_server.py", line 269, in call
return app(environ, start_response)
File "/home/yash/google_appengine/google/appengine/tools/devappserver2/request_rewriter.py", line 311, in _rewriter_middleware
response_body = iter(application(environ, wrapped_start_response))
File "/home/yash/google_appengine/google/appengine/tools/devappserver2/python/request_handler.py", line 148, in call
self._flush_logs(response.get('logs', []))
File "/home/yash/google_appengine/google/appengine/tools/devappserver2/python/request_handler.py", line 284, in _flush_logs
apiproxy_stub_map.MakeSyncCall('logservice', 'Flush', request, response)
File "/home/yash/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 94, in MakeSyncCall
return stubmap.MakeSyncCall(service, call, request, response)
File "/home/yash/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 328, in MakeSyncCall
rpc.CheckSuccess()
File "/home/yash/google_appengine/google/appengine/api/apiproxy_rpc.py", line 156, in _WaitImpl
self.request, self.response)
File "/home/yash/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 200, in MakeSyncCall
self._MakeRealSyncCall(service, call, request, response)
File "/home/yash/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 226, in _MakeRealSyncCall
encoded_response = self._server.Send(self._path, encoded_request)
File "/home/yash/google_appengine/google/appengine/tools/appengine_rpc.py", line 409, in Send
f = self.opener.open(req)
File "/usr/local/lib/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/usr/local/lib/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/local/lib/python2.7/urllib2.py", line 448, in error
return self._call_chain(*args)
File "/usr/local/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/usr/local/lib/python2.7/urllib2.py", line 531, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 403: Forbidden
Traceback (most recent call last):
File "/home/yash/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 1302, in communicate
req.respond()
File "/home/yash/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 831, in respond
self.server.gateway(self).respond()
File "/home/yash/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 2115, in respond
response = self.req.server.wsgi_app(self.env, self.start_response)
File "/home/yash/google_appengine/google/appengine/tools/devappserver2/wsgi_server.py", line 269, in call
return app(environ, start_response)
File "/home/yash/google_appengine/google/appengine/tools/devappserver2/request_rewriter.py", line 311, in _rewriter_middleware
response_body = iter(application(environ, wrapped_start_response))
File "/home/yash/google_appengine/google/appengine/tools/devappserver2/python/request_handler.py", line 148, in call
self._flush_logs(response.get('logs', []))
File "/home/yash/google_appengine/google/appengine/tools/devappserver2/python/request_handler.py", line 284, in _flush_logs
apiproxy_stub_map.MakeSyncCall('logservice', 'Flush', request, response)
File "/home/yash/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 94, in MakeSyncCall
return stubmap.MakeSyncCall(service, call, request, response)
File "/home/yash/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 328, in MakeSyncCall
rpc.CheckSuccess()
File "/home/yash/google_appengine/google/appengine/api/apiproxy_rpc.py", line 156, in _WaitImpl
self.request, self.response)
File "/home/yash/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 200, in MakeSyncCall
self._MakeRealSyncCall(service, call, request, response)
File "/home/yash/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 226, in _MakeRealSyncCall
encoded_response = self._server.Send(self._path, encoded_request)
File "/home/yash/google_appengine/google/appengine/tools/appengine_rpc.py", line 409, in Send
f = self.opener.open(req)
File "/usr/local/lib/python2.7/urllib2.py", line 410, in open
response = meth(req, response)
File "/usr/local/lib/python2.7/urllib2.py", line 523, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/local/lib/python2.7/urllib2.py", line 448, in error
return self._call_chain(*args)
File "/usr/local/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/usr/local/lib/python2.7/urllib2.py", line 531, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 403: Forbidden
INFO 2013-12-22 10:22:05,141 module.py:617] default: "GET /favicon.ico HTTP/1.1" 500 -
I have set my proxy connections (with username and password) as environment variables in apt.conf files and my terminal works fine with it...
i use ubuntu 12.04
reset your proxy environment variables (http_proxy and https_proxy) while running the app server locally. You need them only when you are deploying your app to actual google servers.
I am continuously getting connection Proxy error 502 (connection refused) on Google app engine while running the devserver locally. proxy is by passed for localserver but still its its refusing the connection.
here is what I am getting:
HTTPError()
HTTPError()
Traceback (most recent call last):
File "/home/arslan/GAE/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 1302, in communicate
req.respond()
File "/home/arslan/GAE/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 831, in respond
self.server.gateway(self).respond()
File "/home/arslan/GAE/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 2115, in respond
response = self.req.server.wsgi_app(self.env, self.start_response)
File "/home/arslan/GAE/google_appengine/google/appengine/tools/devappserver2/wsgi_server.py", line 250, in __call__
return app(environ, start_response)
File "/home/arslan/GAE/google_appengine/google/appengine/tools/devappserver2/request_rewriter.py", line 311, in _rewriter_middleware
response_body = iter(application(environ, wrapped_start_response))
File "/home/arslan/GAE/google_appengine/google/appengine/tools/devappserver2/python/request_handler.py", line 89, in __call__
self._flush_logs(response.get('logs', []))
File "/home/arslan/GAE/google_appengine/google/appengine/tools/devappserver2/python/request_handler.py", line 225, in _flush_logs
apiproxy_stub_map.MakeSyncCall('logservice', 'Flush', request, response)
File "/home/arslan/GAE/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 94, in MakeSyncCall
return stubmap.MakeSyncCall(service, call, request, response)
File "/home/arslan/GAE/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 328, in MakeSyncCall
rpc.CheckSuccess()
File "/home/arslan/GAE/google_appengine/google/appengine/api/apiproxy_rpc.py", line 156, in _WaitImpl
self.request, self.response)
File "/home/arslan/GAE/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 200, in MakeSyncCall
self._MakeRealSyncCall(service, call, request, response)
File "/home/arslan/GAE/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 226, in _MakeRealSyncCall
encoded_response = self._server.Send(self._path, encoded_request)
File "/home/arslan/GAE/google_appengine/google/appengine/tools/appengine_rpc.py", line 393, in Send
f = self.opener.open(req)
File "/usr/lib/python2.7/urllib2.py", line 406, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 519, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 444, in error
return self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 527, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 502: Proxy Error ( Connection refused )
Traceback (most recent call last):
File "/home/arslan/GAE/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 1302, in communicate
req.respond()
File "/home/arslan/GAE/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 831, in respond
self.server.gateway(self).respond()
File "/home/arslan/GAE/google_appengine/lib/cherrypy/cherrypy/wsgiserver/wsgiserver2.py", line 2115, in respond
response = self.req.server.wsgi_app(self.env, self.start_response)
File "/home/arslan/GAE/google_appengine/google/appengine/tools/devappserver2/wsgi_server.py", line 250, in __call__
return app(environ, start_response)
File "/home/arslan/GAE/google_appengine/google/appengine/tools/devappserver2/request_rewriter.py", line 311, in _rewriter_middleware
response_body = iter(application(environ, wrapped_start_response))
File "/home/arslan/GAE/google_appengine/google/appengine/tools/devappserver2/python/request_handler.py", line 89, in __call__
self._flush_logs(response.get('logs', []))
File "/home/arslan/GAE/google_appengine/google/appengine/tools/devappserver2/python/request_handler.py", line 225, in _flush_logs
apiproxy_stub_map.MakeSyncCall('logservice', 'Flush', request, response)
File "/home/arslan/GAE/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 94, in MakeSyncCall
return stubmap.MakeSyncCall(service, call, request, response)
File "/home/arslan/GAE/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 328, in MakeSyncCall
rpc.CheckSuccess()
File "/home/arslan/GAE/google_appengine/google/appengine/api/apiproxy_rpc.py", line 156, in _WaitImpl
self.request, self.response)
File "/home/arslan/GAE/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 200, in MakeSyncCall
self._MakeRealSyncCall(service, call, request, response)
File "/home/arslan/GAE/google_appengine/google/appengine/ext/remote_api/remote_api_stub.py", line 226, in _MakeRealSyncCall
encoded_response = self._server.Send(self._path, encoded_request)
File "/home/arslan/GAE/google_appengine/google/appengine/tools/appengine_rpc.py", line 393, in Send
f = self.opener.open(req)
File "/usr/lib/python2.7/urllib2.py", line 406, in open
response = meth(req, response)
File "/usr/lib/python2.7/urllib2.py", line 519, in http_response
'http', request, response, code, msg, hdrs)
File "/usr/lib/python2.7/urllib2.py", line 444, in error
return self._call_chain(*args)
File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 527, in http_error_default
raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 502: Proxy Error ( Connection refused )
INFO 2013-07-17 20:55:24,534 module.py:595] default: "GET /favicon.ico HTTP/1.1" 500 -
I was getting very same error in MS windows, so switched to Ubuntu but still I am getting this. And getting this error after I updated my Google app engine SDK to 1.8.2, previous version was working fine.
Any guess why this is happening ?
Thanks in advance.
Well, I was using the proxy then and GAE/Python Snippet checks for update before running the server and was unable to locate the update server using proxy. Thats why I was getting that error.
I started using network without proxy and things started working normally :).
I placed a _post_put_hook into one of my NDB model types so that that whenever an entity of that type were put, it would invalidate a memcache key. This key is made up with the urlsafe version of the settings key. However, when this code runs, it says this:
Traceback (most recent call last):
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2\webapp2.py", line 1536, in __call__
rv = self.handle_exception(request, response, e)
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2\webapp2.py", line 1530, in __call__
rv = self.router.dispatch(request, response)
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2\webapp2.py", line 1278, in default_dispatcher
return route.handler_adapter(request, response)
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2\webapp2.py", line 1102, in __call__
return handler.dispatch()
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2\webapp2.py", line 572, in dispatch
return self.handle_exception(e, self.app.debug)
File "C:\Program Files (x86)\Google\google_appengine\lib\webapp2\webapp2.py", line 570, in dispatch
return method(*args, **kwargs)
File "U:\Hefner\Dropbox\Public\Projects\GHI\dev\rpc.py", line 68, in get
result = func(*args)
File "U:\Hefner\Dropbox\Public\Projects\GHI\dev\rpc.py", line 154, in pub_refreshSandbox
team_key = s.create.team("Cool Group")
File "U:\Hefner\Dropbox\Public\Projects\GHI\dev\GlobalUtilities.py", line 534, in team
new_team.put()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\ndb\model.py", line 2902, in _put
return self._put_async(**ctx_options).get_result()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\ndb\tasklets.py", line 320, in get_result
self.check_success()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\ndb\tasklets.py", line 315, in check_success
self.wait()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\ndb\tasklets.py", line 299, in wait
if not ev.run1():
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\ndb\eventloop.py", line 219, in run1
delay = self.run0()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\ndb\eventloop.py", line 181, in run0
callback(*args, **kwds)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\ndb\tasklets.py", line 454, in _on_future_completion
self._help_tasklet_along(gen, val)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\ndb\tasklets.py", line 368, in _help_tasklet_along
self.set_result(result)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\ext\ndb\tasklets.py", line 264, in set_result
callback(*args, **kwds)
File "U:\Hefner\Dropbox\Public\Projects\GHI\dev\DataModels.py", line 182, in _post_put_hook
tools.expireCache('allteams-' + self.settings.get().websafe)
AttributeError: 'KeyProperty' object has no attribute 'get'
Here is the relevant model class:
class Team(ndb.Expando):
name = ndb.StringProperty()
show_team = ndb.BooleanProperty()
settings = ndb.KeyProperty()
#classmethod
def _post_put_hook(self, future):
memcache.delete('allteams-' + self.settings.get().websafe)
Ideas?
in this case self.settings is not the actual key but the Models property because this is a classmethod and not an instance method. you need to work on the future object.
here the docs: https://developers.google.com/appengine/docs/python/ndb/futureclass
in this case:
#classmethod
def _post_put_hook(self, future):
entitykey = future.get_result()
entity = entitykey.get()
memcache.delete('allteams-' + entity.settings.get().websafe)
not sure what websafe does for you. maybe you mean entity.settings.urlsafe() ?
I obtain a error when try to write a file in cloud storage
my code:
my_file = files.gs.create('/gs/foo/myfile')
with files.open(my_file, 'a') as f:
f.write('Hello World!')
f.write('Hello World Again!')
Traceback (most recent call last):
File "C:\Datos\proyectos\dropbox\Proyectos\as3\semtable\remote_api\using_datastore.py", line 63, in <module>
f.write('Hello World Again!')
File "C:\Program Files\Google\google_appengine\google\appengine\api\files\file.py", line 281, in __exit__
self.close()
File "C:\Program Files\Google\google_appengine\google\appengine\api\files\file.py", line 275, in close
self._make_rpc_call_with_retry('Close', request, response)
File "C:\Program Files\Google\google_appengine\google\appengine\api\files\file.py", line 388, in _make_rpc_call_with_retry
_make_call(method, request, response)
File "C:\Program Files\Google\google_appengine\google\appengine\api\files\file.py", line 236, in _make_call
_raise_app_error(e)
File "C:\Program Files\Google\google_appengine\google\appengine\api\files\file.py", line 179, in _raise_app_error
raise FileNotOpenedError()
google.appengine.api.files.file.FileNotOpenedError