rendered paste body
Myghty Template Error
Error: Error(NameError): global name 'Response' is not defined
File: /home/rune/apps/pylons/helloworld/helloworld/controllers/hello.py line 5
Context: 2:
3: class HelloController(BaseController):
4: def index(self):
5: return Response('hello world')
6:
7:
8:
Traceback: /home/rune/apps/pylons/helloworld/helloworld/controllers/hello.py:5
/usr/lib/python2.3/site-packages/Pylons-0.8dev_r490-py2.3.egg/pylons/controllers.py:36
/usr/lib/python2.3/site-packages/Pylons-0.8dev_r490-py2.3.egg/pylons/controllers.py:44
/home/rune/apps/pylons/helloworld/helloworld/lib/base.py:8
/usr/lib/python2.3/site-packages/Pylons-0.8dev_r490-py2.3.egg/pylons/myghtyroutes.py:85
/usr/lib/python2.3/site-packages/Pylons-0.8dev_r490-py2.3.egg/pylons/wsgiapp.py:12
/usr/lib/python2.3/site-packages/PasteDeploy-0.5dev_r4459-py2.3.egg/paste/deploy/config.py:157
/usr/lib/python2.3/site-packages/Pylons-0.8dev_r490-py2.3.egg/pylons/middleware.py:20
/usr/lib/python2.3/site-packages/Paste-0.5dev_r4569-py2.3.egg/paste/wsgilib.py:112
/usr/lib/python2.3/site-packages/Paste-0.5dev_r4569-py2.3.egg/paste/httpexceptions.py:592
/usr/lib/python2.3/site-packages/Pylons-0.8dev_r490-py2.3.egg/pylons/error.py:327
/usr/lib/python2.3/site-packages/Paste-0.5dev_r4569-py2.3.egg/paste/evalexception/middleware.py:161
/usr/lib/python2.3/site-packages/Paste-0.5dev_r4569-py2.3.egg/paste/recursive.py:31
/usr/lib/python2.3/site-packages/Pylons-0.8dev_r490-py2.3.egg/pylons/middleware.py:159
/usr/lib/python2.3/site-packages/Paste-0.5dev_r4569-py2.3.egg/paste/cascade.py:92
/usr/lib/python2.3/site-packages/Paste-0.5dev_r4569-py2.3.egg/paste/translogger.py:58
build/bdist.linux-i686/egg/wsgiutils/wsgiServer.py:126
build/bdist.linux-i686/egg/wsgiutils/wsgiServer.py:86
/usr/lib/python2.3/BaseHTTPServer.py:318
/usr/lib/python2.3/BaseHTTPServer.py:324
/usr/lib/python2.3/SocketServer.py:521
/usr/lib/python2.3/SocketServer.py:254
/usr/lib/python2.3/SocketServer.py:463
/usr/lib/python2.3/threading.py:422
/usr/lib/python2.3/threading.py:442
Original Stack Trace:
Error: Error(NameError): global name 'Response' is not defined
File: /home/rune/apps/pylons/helloworld/helloworld/controllers/hello.py line 5
Context: 2:
3: class HelloController(BaseController):
4: def index(self):
5: return Response('hello world')
6:
7:
8:
Traceback: /home/rune/apps/pylons/helloworld/helloworld/controllers/hello.py:5
/usr/lib/python2.3/site-packages/Pylons-0.8dev_r490-py2.3.egg/pylons/controllers.py:36
/usr/lib/python2.3/site-packages/Pylons-0.8dev_r490-py2.3.egg/pylons/controllers.py:44
/home/rune/apps/pylons/helloworld/helloworld/lib/base.py:8
/usr/lib/python2.3/site-packages/Pylons-0.8dev_r490-py2.3.egg/pylons/myghtyroutes.py:85
/usr/lib/python2.3/site-packages/Myghty-1.1-py2.3.egg/myghty/component.py:128
/usr/lib/python2.3/site-packages/Myghty-1.1-py2.3.egg/myghty/request.py:389
/usr/lib/python2.3/site-packages/Myghty-1.1-py2.3.egg/myghty/request.py:250
/usr/lib/python2.3/site-packages/Myghty-1.1-py2.3.egg/myghty/exception.py:61
/usr/lib/python2.3/site-packages/Myghty-1.1-py2.3.egg/myghty/request.py:270
/usr/lib/python2.3/site-packages/Myghty-1.1-py2.3.egg/myghty/http/HTTPHandler.py:138
/usr/lib/python2.3/site-packages/Myghty-1.1-py2.3.egg/myghty/http/WSGIHandler.py:60
/usr/lib/python2.3/site-packages/Myghty-1.1-py2.3.egg/myghty/http/HTTPHandler.py:28
/usr/lib/python2.3/site-packages/Myghty-1.1-py2.3.egg/myghty/http/WSGIHandler.py:25
/usr/lib/python2.3/site-packages/Pylons-0.8dev_r490-py2.3.egg/pylons/wsgiapp.py:12
/usr/lib/python2.3/site-packages/PasteDeploy-0.5dev_r4459-py2.3.egg/paste/deploy/config.py:157
/usr/lib/python2.3/site-packages/Pylons-0.8dev_r490-py2.3.egg/pylons/middleware.py:20
/usr/lib/python2.3/site-packages/Paste-0.5dev_r4569-py2.3.egg/paste/wsgilib.py:112
/usr/lib/python2.3/site-packages/Paste-0.5dev_r4569-py2.3.egg/paste/httpexceptions.py:592
/usr/lib/python2.3/site-packages/Pylons-0.8dev_r490-py2.3.egg/pylons/error.py:327
/usr/lib/python2.3/site-packages/Paste-0.5dev_r4569-py2.3.egg/paste/evalexception/middleware.py:161
/usr/lib/python2.3/site-packages/Paste-0.5dev_r4569-py2.3.egg/paste/recursive.py:31
/usr/lib/python2.3/site-packages/Pylons-0.8dev_r490-py2.3.egg/pylons/middleware.py:159
/usr/lib/python2.3/site-packages/Paste-0.5dev_r4569-py2.3.egg/paste/cascade.py:92
/usr/lib/python2.3/site-packages/Paste-0.5dev_r4569-py2.3.egg/paste/translogger.py:58
build/bdist.linux-i686/egg/wsgiutils/wsgiServer.py:126
build/bdist.linux-i686/egg/wsgiutils/wsgiServer.py:86
/usr/lib/python2.3/BaseHTTPServer.py:318
/usr/lib/python2.3/BaseHTTPServer.py:324
/usr/lib/python2.3/SocketServer.py:521
/usr/lib/python2.3/SocketServer.py:254
/usr/lib/python2.3/SocketServer.py:463
/usr/lib/python2.3/threading.py:422
/usr/lib/python2.3/threading.py:442
Error Traceback
clear this
clear this
URL: http://127.0.0.1:5000/hello
Module pylons.error:327 in respond
<< try:
__traceback_supplement__ = Supplement, self, environ
app_iter = self.application(environ, detect_start_response)
return self.catching_iter(app_iter, environ)
except:>> app_iter = self.application(environ, detect_start_response)
Module paste.httpexceptions:592 in __call__
<< return catch_errors_app(
self.application, environ, start_response,
self.send_http_response, catch=HTTPException)
def send_http_response(self, environ, start_response, exc_info):>> self.send_http_response, catch=HTTPException)
Module paste.wsgilib:112 in catch_errors_app
<< error_occurred = False
try:
app_iter = application(environ, start_response)
except catch:
return error_callback_app(environ, start_response, sys.exc_info())>> app_iter = application(environ, start_response)
Module pylons.middleware:20 in __call__
<< def __call__(self, environ, start_response):
environ['pylons.g'] = self.globals
return self.app(environ, start_response)
#
>> return self.app(environ, start_response)
Module paste.deploy.config:157 in __call__
<< CONFIG.push_thread_config(conf)
try:
app_iter = self.application(environ, start_response)
finally:
if app_iter is None:>> app_iter = self.application(environ, start_response)
Module myghty.request:250 in execute
<< result = None
try:
result = self.execute_component(first_component, base_component = self.request_component, args = self.request_args)
except exception.Abort: raise
except exception.Decline, d: result = d.declined_value>> result = self.execute_component(first_component, base_component = self.request_component, args = self.request_args)
Module myghty.request:389 in execute_component
<< return retval()
result = component.run(self, **args)
discard_buffered_output = False
finally:>> result = component.run(self, **args)
Module myghty.component:128 in run
<< self.threads_init.assign(True)
return self.do_run_component(m = request, ARGS = params, **compparams)
def has_filter(self):>> return self.do_run_component(m = request, ARGS = params, **compparams)
Module pylons.myghtyroutes:85 in do_run_component
<< controller = self.callable_() # Instantiate the controller
controller.c = pylons.c
return controller(**matchargs)
else:
self.run_wsgi_app(self.callable_, **params)>> return controller(**matchargs)
Module helloworld.lib.base:8 in __call__
<< def __call__(self, action, **params):
# Insert any code to be run per request here
Controller.__call__(self, action, **params)>> Controller.__call__(self, action, **params)
Module pylons.controllers:44 in __call__
<< if isinstance(getattr(self, kargs['action'], None), types.MethodType):
func = getattr(self, kargs['action'])
self._inspect_call(func, **kargs)
else:
if CONFIG['default']['debug'] == 'false':>> self._inspect_call(func, **kargs)
Module pylons.controllers:36 in _inspect_call
<< argnames = argspec[0][1:]
args = [kargs[name] for name in argnames if kargs.has_key(name)]
func(*args)
def __call__(self, action, **kargs):>> func(*args)
Module _home_rune_apps_pylons_helloworld_helloworld_controllers_hello_py:5 in index
<< class HelloController(BaseController):
def index(self):
return Response('hello world')>> return Response('hello world')
exceptions.NameError: global name 'Response' is not defined
full traceback
URL: http://127.0.0.1:5000/hello
Module pylons.error:327 in respond
<< try:
__traceback_supplement__ = Supplement, self, environ
app_iter = self.application(environ, detect_start_response)
return self.catching_iter(app_iter, environ)
except:>> app_iter = self.application(environ, detect_start_response)
Module paste.httpexceptions:592 in __call__
<< return catch_errors_app(
self.application, environ, start_response,
self.send_http_response, catch=HTTPException)
def send_http_response(self, environ, start_response, exc_info):>> self.send_http_response, catch=HTTPException)
Module paste.wsgilib:112 in catch_errors_app
<< error_occurred = False
try:
app_iter = application(environ, start_response)
except catch:
return error_callback_app(environ, start_response, sys.exc_info())>> app_iter = application(environ, start_response)
Module pylons.middleware:20 in __call__
<< def __call__(self, environ, start_response):
environ['pylons.g'] = self.globals
return self.app(environ, start_response)
#
>> return self.app(environ, start_response)
Module paste.deploy.config:157 in __call__
<< CONFIG.push_thread_config(conf)
try:
app_iter = self.application(environ, start_response)
finally:
if app_iter is None:>> app_iter = self.application(environ, start_response)
Module myghty.request:250 in execute
<< result = None
try:
result = self.execute_component(first_component, base_component = self.request_component, args = self.request_args)
except exception.Abort: raise
except exception.Decline, d: result = d.declined_value>> result = self.execute_component(first_component, base_component = self.request_component, args = self.request_args)
Module myghty.request:389 in execute_component
<< return retval()
result = component.run(self, **args)
discard_buffered_output = False
finally:>> result = component.run(self, **args)
Module myghty.component:128 in run
<< self.threads_init.assign(True)
return self.do_run_component(m = request, ARGS = params, **compparams)
def has_filter(self):>> return self.do_run_component(m = request, ARGS = params, **compparams)
Module pylons.myghtyroutes:85 in do_run_component
<< controller = self.callable_() # Instantiate the controller
controller.c = pylons.c
return controller(**matchargs)
else:
self.run_wsgi_app(self.callable_, **params)>> return controller(**matchargs)
Module helloworld.lib.base:8 in __call__
<< def __call__(self, action, **params):
# Insert any code to be run per request here
Controller.__call__(self, action, **params)>> Controller.__call__(self, action, **params)
Module pylons.controllers:44 in __call__
<< if isinstance(getattr(self, kargs['action'], None), types.MethodType):
func = getattr(self, kargs['action'])
self._inspect_call(func, **kargs)
else:
if CONFIG['default']['debug'] == 'false':>> self._inspect_call(func, **kargs)
Module pylons.controllers:36 in _inspect_call
<< argnames = argspec[0][1:]
args = [kargs[name] for name in argnames if kargs.has_key(name)]
func(*args)
def __call__(self, action, **kargs):>> func(*args)
Module _home_rune_apps_pylons_helloworld_helloworld_controllers_hello_py:5 in index
<< class HelloController(BaseController):
def index(self):
return Response('hello world')>> return Response('hello world')
exceptions.NameError: global name 'Response' is not defined
Extra Features
>> Display the lines of code near each part of the traceback
Show a debug prompt to allow you to directly debug the code at the traceback
Re-GET Page