I suspect the message that says "Query did not return any row" means in fact that the query returned an error message instead. Make sure debug is turned on in your config file and check the error log more closely to see if there is a more descriptive error.
Check to make sure the query file is loaded and the query is named correctly.