Pylons mako templates: debugging “Internal Server Error” / “NoneType” errors

StackOverflow https://stackoverflow.com/questions/4927050

  •  30-10-2019
  •  | 
  •  

Frage

I frequently encounter this error in Mako templates using Pylons 0.9.7:

AttributeError: 'NoneType' object has no attribute 'decode'

Usually I've entered a variable name that doesn't exist, tried to use a linbebreak within a code line, or some other minor error. Definitely my fault.

This results in a 'Internal Server Error' in the browser, same thing in the debug view, and a stack trace that starts in HTTPServer and ends with the AttributeError in mako/exceptions.py.

Is there anything I can do to make this easier to debug, like find out the line that exception is being generated on within the Mako template? Thanks!

Keine korrekte Lösung

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top