mirror of
				https://github.com/gsi-upm/senpy
				synced 2025-10-30 23:18:17 +00:00 
			
		
		
		
	added timeout message to finally fix #5
This commit is contained in:
		| @@ -24,8 +24,10 @@ class DaedalusPlugin(SentimentPlugin): | |||||||
|                       'txt': txt, |                       'txt': txt, | ||||||
|                       'src': 'its-not-a-real-python-sdk' |                       '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) |         value = r.json().get('score_tag', None) | ||||||
|         if not value: |         if not value: | ||||||
|             raise Error(r.json()) |             raise Error(r.json()) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user