'Querying data from sqlite3 database

I'm new to python, kindly need your help. I want to query data from the database and here is my code and am having a typeError. TypeError: query_data() missing 2 required positional arguments:

here is what i have tried and am expecting a list of dictionary



Solution 1:[1]

You're giving two arguments to query_data(), while there should be none - the router (/query) does not ask for any single parameter. In other words what you have in the decorator you need to have in function definition.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Marcin P?ciak