Running google app engine locally tbehind a proxy - google-app-engine
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.
Related
How can I fix Flask in local appengine env giving 404/500 error
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
Django 1.11 - python 3.4 // not able to createsuperuser
**(geoenv) C:\Users\Nitish\Desktop\Mtech Project\Stage 8 database start\geosite>python manage.py createsuperuser You have 13 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, auth, contenttypes, sessions. Run 'python manage.py migrate' to apply them. Traceback (most recent call last): File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\db\backends\utils.py", line 65, in execute return self.cursor.execute(sql, params) File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\db\backends\sqlite3\base.py", line 328, in execute return Database.Cursor.execute(self, query, params) sqlite3.OperationalError: no such table: auth_user The above exception was the direct cause of the following exception: Traceback (most recent call last): File "manage.py", line 22, in execute_from_command_line(sys.argv) File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\core\management__init__.py", line 363, in execute_from_command_line utility.execute() File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\core\management__init__.py", line 355, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\core\management\base.py", line 283, in run_from_argv self.execute(*args, **cmd_options) File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\contrib\auth\management\commands\createsuperuser.py", line 63, in execute return super(Command, self).execute(*args, **options) File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\core\management\base.py", line 330, in execute output = self.handle(*args, **options) File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\contrib\auth\management\commands\createsuperuser.py", line 96, in handle default_username = get_default_username() File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\contrib\auth\management__init__.py", line 148, in get_default_username auth_app.User._default_manager.get(username=default_username) File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\db\models\manager.py", line 85, in manager_method return getattr(self.get_queryset(), name)(*args, **kwargs) File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\db\models\query.py", line 374, in get num = len(clone) File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\db\models\query.py", line 232, in len self._fetch_all() File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\db\models\query.py", line 1105, in _fetch_all self._result_cache = list(self._iterable_class(self)) File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\db\models\query.py", line 53, in iter results = compiler.execute_sql(chunked_fetch=self.chunked_fetch) File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\db\models\sql\compiler.py", line 886, in execute_sql raise original_exception File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\db\models\sql\compiler.py", line 876, in execute_sql cursor.execute(sql, params) File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\db\backends\utils.py", line 80, in execute return super(CursorDebugWrapper, self).execute(sql, params) File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\db\backends\utils.py", line 65, in execute return self.cursor.execute(sql, params) File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\db\utils.py", line 94, in exit six.reraise(dj_exc_type, dj_exc_value, traceback) File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\utils\six.py", line 685, in reraise raise value.with_traceback(tb) File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\db\backends\utils.py", line 65, in execute return self.cursor.execute(sql, params) File "C:\Users\Nitish\Desktop\MTECHP~1\STAGE8~1\geoenv\lib\site-packages\django\db\backends\sqlite3\base.py", line 328, in execute return Database.Cursor.execute(self, query, params) django.db.utils.OperationalError: no such table: auth_user
createsuperuser cmd can only be used after making models and makemigrations and migrate cmd. I was trying to use it before that.
HTTPError: HTTP Error 502: Proxy Error ( Connection refused )
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 :).
error FileNotOpenedError
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
Deploy not working on Google App Angine
I am not able to deploy any project to Google App Engine and this is the error I get File "F:\Program Files\Google\google_appengine\google\appengine\tools\appcfg.py", line 1250, in DoUpload missing_files = self.Begin() File "F:\Program Files\Google\google_appengine\google\appengine\tools\appcfg.py", line 1045, in Begin version=self.version, payload=self.config.ToYAML()) File "F:\Program Files\Google\google_appengine\google\appengine\tools\appengine_rpc.py", line 356, in Send self._Authenticate() File "F:\Program Files\Google\google_appengine\google\appengine\tools\appengine_rpc.py", line 391, in _Authenticate super(HttpRpcServer, self)._Authenticate() File "F:\Program Files\Google\google_appengine\google\appengine\tools\appengine_rpc.py", line 271, in _Authenticate auth_token = self._GetAuthToken(credentials[0], credentials[1]) File "F:\Program Files\Google\google_appengine\google\appengine\tools\appengine_rpc.py", line 214, in _GetAuthToken response = self.opener.open(req) File "F:\Python25\lib\urllib2.py", line 381, in open response = self._open(req, data) File "F:\Python25\lib\urllib2.py", line 399, in _open '_open', req) File "F:\Python25\lib\urllib2.py", line 360, in _call_chain result = func(*args) File "F:\Python25\lib\urllib2.py", line 1115, in https_open return self.do_open(httplib.HTTPSConnection, req) File "F:\Python25\lib\urllib2.py", line 1082, in do_open raise URLError(err) URLError: < urlopen error (8, 'EOF occurred in violation of protocol') >
It looks like fiddler was interfering with upload, I did not know how to disable it so stopped it and then upload happened instantly. I got the clue from this blogpost. Specially the part proxies can result in this problem, which is likely caused by the HTTP header send being terminated prematurely.