ENH catch attribute error