diff --git a/wolframalpha/__init__.py b/wolframalpha/__init__.py index 315068e..b005a23 100644 --- a/wolframalpha/__init__.py +++ b/wolframalpha/__init__.py @@ -14,6 +14,9 @@ compat.fix_HTTPMessage() class Result(object): def __init__(self, stream): self.tree = etree.parse(stream) + self._handle_error() + + def _handle_error(self): error = self.tree.find('error') if error: code = error.find('code').text