[Tutor] List of tuples

Danny Yoo dyoo at hashcollision.org
Tue Apr 19 21:35:14 EDT 2016


Okay, in the context of a function, the error you're seeing makes more
sense.

You need to ensure that the return value of the function is of the right
type.  In  SingleView, the intended return value appears to be a structured
response value.

Given that, then any other return statements in the body of the function
are suspect: return is a statement that will finish a function.

If a function returns a value of a tour that it isn't supposed to, expect
that to produce very strange error messages.  That's essentially what
you're seeing.

Looking at the construction of the response at the end:

>     return render_template("view.html",data=data,formB=formB)
>

I'm wondering: perhaps you can collect the extracted column and add it as
an additional value in you're template?

If you have questions, please feel free to ask.


More information about the Tutor mailing list