· 9 years ago · Dec 23, 2016, 11:52 AM
1114 env["wsgi.multithread"] = False
2 115 env["wsgi.multiprocess"] = False
3=> 116 result = application(env, _start_response)
4 117 if result is not None:
5 118 for data in result:
6
7result undefined, application = <google.appengine.ext.webapp._webapp25.WSGIApplication object>, env = {'APPENGINE_RUNTIME': 'python', 'APPLICATION_ID': 'dev~app', 'AUTH_DOMAIN': 'gmail.com', 'CONTENT_LENGTH': '-1', 'CONTENT_TYPE': 'application/x-www-form-urlencoded', 'CURRENT_VERSION_ID': '1.1', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3', 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.8', ...}, global _start_response = <function _start_response>
8 C:Program FilesGooglegoogle_appenginegoogleappengineextwebapp_webapp25.py in __call__(self=<google.appengine.ext.webapp._webapp25.WSGIApplication object>, environ={'APPENGINE_RUNTIME': 'python', 'APPLICATION_ID': 'dev~app', 'AUTH_DOMAIN': 'gmail.com', 'CONTENT_LENGTH': '-1', 'CONTENT_TYPE': 'application/x-www-form-urlencoded', 'CURRENT_VERSION_ID': '1.1', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3', 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.8', ...}, start_response=<function _start_response>)
9
10 715 handler.error(501)
11 716 except Exception, e:
12=> 717 handler.handle_exception(e, self.__debug)
13 718 else:
14 719 response.set_status(404)
15
16handler = <__main__.RecentRunsHandler object>, handler.handle_exception = <bound method RecentRunsHandler.handle_exception of <__main__.RecentRunsHandler object>>, e = AttributeError("**'dict' object has no attribute 'friends'",)**, self = <google.appengine.ext.webapp._webapp25.WSGIApplication object>, self.__debug undefined
17 C:Program FilesApache Software FoundationTomcat 7.0webappsROOTappmain.py in handle_exception(self=<__main__.RecentRunsHandler object>, ex=AttributeError("'dict' object has no attribute 'friends'",), debug_mode=True)
18 228 self.log_exception(ex)
19 229 self.render(u'error',
20=> 230 trace=traceback.format_exc(), debug_mode=debug_mode)
21 231
22 232 def log_exception(self, ex):
23
24trace undefined, global traceback = <module 'traceback' from 'C:Python27libtraceback.pyc'>, traceback.format_exc = <function format_exc>, debug_mode = True
25 C:Program FilesApache Software FoundationTomcat 7.0webappsROOTappmain.py in render(self=<__main__.RecentRunsHandler object>, name=u'error', **data={'debug_mode': True, 'trace': 'Traceback (most recent call last):n File "C:\Pr...eError: 'dict' object has no attribute 'friends'n'})
26 265 u'appId': conf.FACEBOOK_APP_ID,
27 266 u'canvasName': conf.FACEBOOK_CANVAS_NAME,
28=> 267 u'userIdOnServer': self.user.user_id if self.user else None,
29 268 })
30 269 data[u'logged_in_user'] = self.user
31
32self = <__main__.RecentRunsHandler object>, self.user = {u'id': u'100003906996287', u'name': u'Sudhir Jain'}, self.user.user_id undefined, builtin None = None
33**<type 'exceptions.AttributeError'>: 'dict' object has no attribute 'user_id'
34 args = ("'dict' object has no attribute 'user_id'",)
35 message = "'dict' object has no attribute 'user_id'"**
36
37def render(self, name, **data):
38 """Render a template"""
39 if not data:
40 data = {}
41 data[u'js_conf'] = json.dumps({
42 u'appId': conf.FACEBOOK_APP_ID,
43 u'canvasName': conf.FACEBOOK_CANVAS_NAME,
44 u'userIdOnServer': self.user.user_id if self.user else None,
45 })
46 data[u'logged_in_user'] = self.user
47 data[u'message'] = self.get_message()
48 data[u'csrf_token'] = self.csrf_token
49 data[u'canvas_name'] = conf.FACEBOOK_CANVAS_NAME
50 self.response.out.write(template.render(
51 os.path.join(
52 os.path.dirname(__file__), 'templates', name + '.html'),
53 data))