I'm getting a strange error when trying to run my Flask app. I set the teardown_appcontext to be a function I have to close the database: app.teardown_appcontext(close_db). When I visit the site or initialize the database, I get the error: TypeError: close_db() takes 0 positional arguments but 1 was given.
In testing, I set the arguments for close_db to *arg and it worked without issues, but when I print *arg it returns None. Why is it angry about getting too many arguments if nothing is being passed to close_db?