Manual: fixed use of execute() and fetchone()

and improved error message.

Former code resulted in
`
AttributeError: 'NoneType' object has no attribute 'fetchone'
`