title: Using database in python, have to add a new row in the existing table, but get a lot of errors
body: <p>I am a beginner when it comes to code, and I am working on a school assignment where I have to Add a new student, and
  ask the user for the following (in order):</p>
  
  <p>Name,
  Email and
  Year.
  Then adds the new student to the database.</p>
  
  <p>My code is as follows:</p>
  
  <pre><code>new_student = Students(id=5, name='Lise', email='lise@.com', year=2020)
  session.add(new_student)
  session.commit()
  student = session.query(Students).get(new_student.id)
  
  for students in student:
      print(f'Added student: {students.id} {students.name} {students.email} {students.year}')
  </code></pre>
  
  <p>I got a lot of errors after I wrote this code, and the last line says "<em>sqlalchemy.orm.exc.FlushError: New instance  with identity key (, (5,), None) conflicts with persistent instance </em>"</p>
  
  <p>What is wrong with my code, and what is missing? Thanks in advance.</p>