[Tutor] postgreSQL + psycopg2

Peter Otten __peter__ at web.de
Tue May 10 03:00:20 EDT 2016


nitin chandra wrote:

> Thanks Alan, Peter
> 
> but didn't work
> 
>     nextrow=(cursor1.execute(query, (design1,))).fetchone()
> AttributeError: 'NoneType' object has no attribute 'fetchone'

Try without the method chaining:

cursor1.execute(query, (design1,))
nextrow = cursor1.fetchone()



More information about the Tutor mailing list