Get query result from python
<p>I have code in Python that want to get results from this query but got errors : </p>

<pre><code>AttributeError: 'Future' object has no attribute 'fetchone'
</code></pre>

<p>here is my code: </p>

<pre><code>            domain = bid_request["site"]["domain"]
            site = yield self.db.execute('SELECT "Id", "State", "LastAccess", "Domain", "RubricId", '
                                         '"IgnoreInInterests", "PriceCPM" '
                                         'FROM whis2011."RtbActiveSites" '
                                         'WHERE "Domain" = \'%s\' '
                                         'ORDER BY "Id" DESC limit 1;' % domain).fetchone() 

  self.add_header('Content-Type', 'text/html; charset=utf-8')

            if len(site) &gt; 0: .....
</code></pre>

<p>Also, I need "site" variable because as you see I'll use it latter. 
How I can fix it?</p>

<p>Thanks</p>

<p>It's seems if I use "fetchall()" instead of "fetchone()" it will be work!</p>

python database