title: AttributeError: 'InstrumentedList' object has no attribute
body: <p>I have these tables tables:</p>
  
  <pre><code>class Thing(Base):
      __tablename__ = 'thing'
      id = Column(Integer, primary_key=True)
  
  class User(Base):
      __tablename__ = 'user'
      id = Column(Integer, primary_key=True)
  
  class Voteinfo(Base):
      __tablename__ = 'voteinfo'
      thing_id = Column(Integer, ForeignKey('thing.id'), primary_key=True)
      thing = relationship('Thing', backref='voteinfo')
      upvotes = Column(Integer)
      downvotes = Column(Integer)
  
      def __init__(self, thing)
          self.thing = thing
  
  class VoteThing(Base):
      __tablename__ = 'votething'
      id = Column(Integer, primary_key=True)
      voter_id = Column(Integer, ForeignKey('voter.id'))
      voter = relationship('Voter', backref='votescast')
      thing_id = Column(Integer, ForeignKey('thing.id'))
      thing = relationship('Thing', backref='votesreceived')
      value = Column(Boolean)
  
      def __init__(self, voter, thing, value):
          if value is True:
              thing.voteinfo.upvotes += 1
          else:
              thing.voteinfo.downvotes += 1
  </code></pre>
  
  <p>When I try to run this, I get this error code in the "if value is True" clause:</p>
  
  <pre><code>AttributeError: 'InstrumentedList' object has no attribute 'upvotes'
  </code></pre>
  
  <p>I've tried giving Voteinfo its own unique ID and adding uselist=False to the relationship. I've tried replacing the relationship to thing from VoteThing to Voteinfo, but that didn't help either. I don't know what an InstrumentedList is. What is going on?</p>