Python3: exceptions must derive from BaseException