Handle empty result set in python client