title: TypeError: __init__() got an unexpected keyword argument error
body: <p>I have 6 tables in an sqlite database and I'm trying to add a new row in one of the tables using sqlalchemy. Here is my tables:</p>
  
  <pre><code>class DSource(Base):
      __tablename__ = 'dsource'
  
      source_id = Column(Integer, primary_key=True)
      subjects= relationship("Subject") 
  
  class Subject(Base):
      __tablename__ = 'subject'
  
      subject_id = Column(Integer, primary_key=True)
      source_id=Column(Integer, ForeignKey("dsource.source_id"),nullable=False)
      sequences= relationship("Sequence")
  
  class Sequence(Base):
       __tablename__ = 'sequence'
  
       sequence_id = Column(Integer, primary_key=True)
       subject_id=Column(Integer, ForeignKey("subject.subject_id"),nullable=False)
  </code></pre>
  
  <p>Here is the code I'm using to add a new sequence to the table:</p>
  
  <pre><code>engine = create_engine('sqlite:////Desktop/emotion_data/test.db',echo=True)
  Session = sessionmaker(bind=engine)
  session = Session()
  
  new_sequence=Sequence(sequence_id=0,subject_id=1)
  session.add(new_sequence)
  session.commit()
  </code></pre>
  
  <p>But I'm getting this error:</p>
  
  <pre><code>TypeError: __init__() got an unexpected keyword argument 'subject_id'
  </code></pre>
  
  <p>I have no idea what does that mean, I already have imported a "subject" instance with "subject_id=0" to the table, so the subject_id=0 is already in the database.</p>
  
  <p>Can anybody please help me?</p>