TypeError: argument of type ‘NoneType’ is not iterable when pulling from database
I’m building an app with a Flask-based API and a PostgreSQL database. A big part of the project is a recommendation algorithm that fetches data dynamically from the database and processes it in pandas DataFrames. When I try to access http://127.0.0.1:5000/recomender/1
to get recommendations for the user with student_id = 1
, I get the error:
TypeError: argument of type 'NoneType' is not iterable