[PATCH 2/2] bugfix add error = None before testing