diff --git a/aixplain/modules/pipeline/asset.py b/aixplain/modules/pipeline/asset.py index f9e29235..308f19b3 100644 --- a/aixplain/modules/pipeline/asset.py +++ b/aixplain/modules/pipeline/asset.py @@ -139,7 +139,7 @@ def poll(self, poll_url: Text, name: Text = "pipeline_process") -> Dict: r = _request_with_retry("get", poll_url, headers=headers) try: resp = r.json() - if isinstance(resp["data"], str): + if "data" in resp and isinstance(resp["data"], str): try: resp["data"] = json.loads(resp["data"])["response"] except Exception: