"sqlalchemy.exc.InvalidRequestError Entity '<class ''>' has no property ... " exception after updating database
<p>I am trying to update row in SQLite table by id. </p>

<p>I have class</p>

<pre><code>class newTestCaseData(Base):
    __tablename__ = 'test_cases'
    __table_args__ = {"useexisting": True}


    failure_datails = Column('failure_details', String)
    exec_status = Column('exec_status', String)
    execution_duration = Column('execution_duration', String)

    def __init__(self, failure_details=None, execution_duration=None, exec_status = None):
        self.failure_datails = failure_details
        self.execution_duration = execution_duration
        self.exec_status = exec_status
</code></pre>

<p>And here is my method for updating row in the table:</p>

<pre><code>def update_by_external_id(self, tc_external_id, add_tc_status, add_tc_duration, add_failure_details):
    self.new_session.query(newTestCaseData).filter_by(external_id=tc_external_id).\
            update({
                    'exec_status': add_tc_status,
                    'execution_duration': add_tc_duration,
                    'failure_details': add_failure_details})
        self.new_session.commit()
</code></pre>

<p>After this execution I get error: <code>sqlalchemy.exc.InvalidRequestError: Entity '&lt;class 'models.TestCaseData.newTestCaseData'&gt;' has no property 'failure_details'</code></p>

<p>But everything works fine if I delete 'failure_details' from method 'update_by_external_id':</p>

<pre><code>def update_by_external_id(self, tc_external_id, add_tc_status, add_tc_duration):
    self.new_session.query(TestCaseDatas).filter_by(external_id=tc_external_id).\
            update({
                    'exec_status': add_tc_status,
                    'execution_duration': add_tc_duration})
        self.new_session.commit()
</code></pre>

<p>Here is 'failure_details' column in SQLite Studio:
<a href="http://i.stack.imgur.com/ejX4O.png" rel="nofollow"><img src="http://i.stack.imgur.com/ejX4O.png" alt="enter image description here"></a></p>

<p>What am I doing wrong? </p>

<p>There is spelling mistake in the "failure_datails"</p>

python sqlite sqlalchemy