Also catch AttributeError since it is possible to not get back JSON data. Fixes #457