Skip to content

Tag: sqlalchemy

scalars() leaving out column

I have the following code that should get the last known action of users and insert it’s timestamp in the user object: This results in the following error: Even though the column is being selected in the generated query: Does anyone know why the user_id column is not showing up in the Event objects? Upd…

Flask App Deployment: Internal Server Error

I recently tried to deploy a flask app using Heroku. However, I encountered an internal server error. My code can be found here: https://github.com/chaneth8/Task_List. This is the message that appeared on my log in Heroku – what could the error be? Thanks in advance. Answer I studied your code and hoste…

How to Update in sqlalchemy using objects?

I have a student table in postgres with the following columns Studentid | Student_name | Student_division I am using sql alchemy and have modeled it as How to update? This doesnt work. Answer you need to commit the changes and remove the session.add(x) just keep session.commit()