'Nonetype' object has no attribute 'cursor' : flask
www.reddit.com › r › flaskWith the @app.route decorator, the text() function exists in the application request context, but tcomment doesn't have access to the same context. You could either pass in the cursor as a parameter, initialize the cursor in the tcomment() function, or create a decorator to add the request context to tcomment.