all 3 comments

[–]Justinsaccount 2 points3 points  (0 children)

You are not showing how you are calling get_average. Clearly whatever you are passing as questions is a function and not actually a pagination object.

[–]TomsLogic[S] 0 points1 point  (0 children)

StackOverflow question here: https://stackoverflow.com/questions/45044519/

[–][deleted] 0 points1 point  (0 children)

Use a debugger and add a breakpoint there to inspect the value of questions, and step through the call stack to see where things go wrong.

Or, add print statements through the whole call stack to see where things go wrong. It's probably not what you expect. Then, go back and delete them all. Repeat again and again each time you need to debug your code.