Hola estoy haciendo una función que recupera un valor float de una tabla MySQL. Me aparece el error: TypeError: 'NoneType' object is unsubscriptable El código es: self.cursor.execute('SELECT lectura FROM estacion WHERE id="%d"'%(id)) lectura_anterior = self.cursor.fetchone() print "Lectura: %.4f" % lectura_anterior[0]