diff --git a/sentiment-meaningCloud/sentiment-meaningCloud.py b/sentiment-meaningCloud/sentiment-meaningCloud.py index b70c1ce..1ba9cd2 100644 --- a/sentiment-meaningCloud/sentiment-meaningCloud.py +++ b/sentiment-meaningCloud/sentiment-meaningCloud.py @@ -24,8 +24,10 @@ class DaedalusPlugin(SentimentPlugin): 'txt': txt, 'src': 'its-not-a-real-python-sdk' } - r = requests.post(api, params=parameters, timeout=3) - + try: + r = requests.post(api, params=parameters, timeout=3) + except requests.exceptions.Timeout: + raise Error("Meaning Cloud API does not response") value = r.json().get('score_tag', None) if not value: raise Error(r.json())