Hello everyone,

I want to build a web interface to a database that I am populating with 
python and sqlalchemy.
I am running windows 8, not windows 8.1 and python 3.4. I have used the 
pytho.org installer for python.

after installing tg.devtools, generating the quickstart project and 
installing it as specified in the tutorial and running "gearbox serve 
--reload --debug" I get an exception when i try to load the root URL /.

The exception page starts with:

builtins.Exception 

Exception: Unhandled node type <class '_ast.NameConstant'>

and then it has a massive traceback. It may not be a problem with 
turbogears but i don't know where else to start.
it appears to throw the exception in "genshi"

I know I probably haven't supplied information, but I am hoping someone has 
run into this. Here is the full exception traceback:

builtins.Exception

Exception: Unhandled node type <class '_ast.NameConstant'>
Traceback *(most recent call last)* 

   - File "D:\Python34\lib\site-packages\tg\wsgiapp.py", line *122*, in 
   __call__ 
   
   response = self.wrapped_dispatch(controller, environ, context)
   
   - File "D:\Python34\lib\site-packages\tg\appwrappers\errorpage.py", line 
   *56*, in __call__ 
   
   resp = self.next_handler(controller, environ, context)
   
   - File 
   "D:\Python34\lib\site-packages\tg\appwrappers\transaction_manager.py", 
   line *107*, in __call__ 
   
   reraise(*exc_info)
   
   - File "D:\Python34\lib\site-packages\tg\_compat.py", line *81*, in 
   reraise 
   
   raise value
   
   - File 
   "D:\Python34\lib\site-packages\tg\appwrappers\transaction_manager.py", 
   line *83*, in __call__ 
   
   response = self.next_handler(controller, environ, context)
   
   - File "D:\Python34\lib\site-packages\tg\appwrappers\caching.py", line 
   *54*, in __call__ 
   
   return self.next_handler(controller, environ, context)
   
   - File "D:\Python34\lib\site-packages\tg\appwrappers\session.py", line 
   *71*, in __call__ 
   
   response = self.next_handler(controller, environ, context)
   
   - File "D:\Python34\lib\site-packages\tg\appwrappers\identity.py", line 
   *47*, in __call__ 
   
   return self.next_handler(controller, environ, context)
   
   - File "D:\Python34\lib\site-packages\tg\appwrappers\i18n.py", line *71*, 
   in __call__ 
   
   return self.next_handler(controller, environ, context)
   
   - File "D:\Python34\lib\site-packages\tg\wsgiapp.py", line *295*, in 
   dispatch 
   
   return controller(environ, context)
   
   - File "d:\current2\python\tg\dict\dict\lib\base.py", line *27*, in 
   __call__ 
   
   return TGController.__call__(self, environ, context)
   
   - File "D:\Python34\lib\site-packages\tg\controllers\dispatcher.py", 
   line *128*, in __call__ 
   
   response = self._perform_call(context)
   
   - File "D:\Python34\lib\site-packages\tg\controllers\dispatcher.py", 
   line *109*, in _perform_call 
   
   r = self._call(func, params, remainder=remainder, context=context)
   
   - File 
   "D:\Python34\lib\site-packages\tg\controllers\decoratedcontroller.py", 
   line *127*, in _call 
   
   response = self._render_response(context, controller, output)
   
   - File 
   "D:\Python34\lib\site-packages\tg\controllers\decoratedcontroller.py", 
   line *237*, in _render_response 
   
   template_name=template_name, **render_params)
   
   - File "D:\Python34\lib\site-packages\tg\render.py", line *212*, in 
   render 
   
   kwargs['result'] = render_function(template_name, tg_vars, **kwargs)
   
   - File "D:\Python34\lib\site-packages\tg\renderers\genshi.py", line *212*, 
   in __call__ 
   
   ns_options=('doctype', 'method'), **kwargs)
   
   - File "D:\Python34\lib\site-packages\tg\render.py", line *278*, in 
   cached_template 
   
   return render_func()
   
   - File "D:\Python34\lib\site-packages\tg\renderers\genshi.py", line *208*, 
   in render_template 
   
   encoding=None)
   
   - File "D:\Python34\lib\site-packages\genshi\core.py", line *184*, in 
   render 
   
   return encode(generator, method=method, encoding=encoding, out=out)
   
   - File "D:\Python34\lib\site-packages\genshi\output.py", line *57*, in 
   encode 
   
   return _encode(''.join(list(iterator)))
   
   - File "D:\Python34\lib\site-packages\genshi\output.py", line *350*, in 
   __call__ 
   
   for kind, data, pos in stream:
   
   - File "D:\Python34\lib\site-packages\genshi\output.py", line *829*, in 
   __call__ 
   
   for kind, data, pos in stream:
   
   - File "D:\Python34\lib\site-packages\genshi\output.py", line *669*, in 
   __call__ 
   
   for kind, data, pos in stream:
   
   - File "D:\Python34\lib\site-packages\genshi\output.py", line *774*, in 
   __call__ 
   
   for kind, data, pos in chain(stream, [(None, None, None)]):
   
   - File "D:\Python34\lib\site-packages\genshi\output.py", line *594*, in 
   __call__ 
   
   for ev in stream:
   
   - File "D:\Python34\lib\site-packages\genshi\core.py", line *289*, in 
   _ensure 
   
   for event in stream:
   
   - File "D:\Python34\lib\site-packages\genshi\template\base.py", line 
   *630*, in _include 
   
   for event in tmpl.generate(ctxt, **vars):
   
   - File "D:\Python34\lib\site-packages\genshi\template\base.py", line 
   *544*, in generate 
   
   stream = self.stream
   
   - File "D:\Python34\lib\site-packages\genshi\template\base.py", line 
   *454*, in stream 
   
   self._stream = list(self._prepare(self._stream))
   
   - File "D:\Python34\lib\site-packages\genshi\template\base.py", line 
   *490*, in _prepare 
   
   yield kind, (directives, list(substream)), pos
   
   - File "D:\Python34\lib\site-packages\genshi\template\base.py", line 
   *490*, in _prepare 
   
   yield kind, (directives, list(substream)), pos
   
   - File "D:\Python34\lib\site-packages\genshi\template\base.py", line 
   *485*, in _prepare 
   
   namespaces, pos)
   
   - File "D:\Python34\lib\site-packages\genshi\template\directives.py", 
   line *397*, in attach 
   
   namespaces, pos)
   
   - File "D:\Python34\lib\site-packages\genshi\template\directives.py", 
   line *82*, in attach 
   
   return cls(value, template, namespaces, *pos[1:]), stream
   
   - File "D:\Python34\lib\site-packages\genshi\template\directives.py", 
   line *60*, in __init__ 
   
   self.expr = self._parse_expr(value, template, lineno, offset)
   
   - File "D:\Python34\lib\site-packages\genshi\template\directives.py", 
   line *109*, in _parse_expr 
   
   lookup=template.lookup) or None
   
   - File "D:\Python34\lib\site-packages\genshi\template\eval.py", line *93*, 
   in __init__ 
   
   filename=filename, lineno=lineno, xform=xform)
   
   - File "D:\Python34\lib\site-packages\genshi\template\eval.py", line 
   *463*, in _compile 
   
   new_source = ASTCodeGenerator(tree).code
   
   - File "D:\Python34\lib\site-packages\genshi\template\astutil.py", line 
   *43*, in __init__ 
   
   self.visit(tree)
   
   - File "D:\Python34\lib\site-packages\genshi\template\astutil.py", line 
   *91*, in visit 
   
   ret = visitor(node)
   
   - File "D:\Python34\lib\site-packages\genshi\template\astutil.py", line 
   *104*, in visit_Expression 
   
   return self.visit(node.body)
   
   - File "D:\Python34\lib\site-packages\genshi\template\astutil.py", line 
   *90*, in visit 
   
   raise Exception('Unhandled node type %r' % type(node))
   
   
Exception: Unhandled node type <class '_ast.NameConstant'>

The debugger caught an exception in your WSGI application. You can now look 
at the traceback which led to the error. 

To switch between the interactive traceback and the plaintext one, you can 
click on the "Traceback" headline. From the text traceback you can also 
create a paste of it. For code execution mouse-over the frame you want to 
debug and click on the console icon on the right side.

You can execute arbitrary Python code in the stack frames and there are 
some extra helpers available for introspection:

   - dump() shows all variables in the frame
   - dump(obj) dumps all that's known about the object
   - ctx the context of the failed request

*Backlash*, using the Werkzeug Debugger. 


-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/turbogears.
For more options, visit https://groups.google.com/d/optout.

Reply via email to