Closed garretthoffman closed 6 years ago
This (perspectiveapi) appears to be a third-party service. The endpoint of the third-party service is timing out, apparently.
You can work around this by doing this in your script before you make the call to the service:
import socket
socket.setdefaulttimeout(300)
300 == 60 * 5 (300 seconds, or 5 minutes)
The default is 60 seconds.
Is this issue resolved? I'm still getting timeout error even after using socket default timeout.
Is this issue resolved? I'm still getting timeout error even after using socket default timeout. do you solve it ?
I am trying to make post requests through the
googleapiclient
to the google Perspectives API like in the example here: https://github.com/conversationai/perspectiveapi/blob/master/api_reference.mdThe same request is working through a curl command on the command line but connection
service = discovery.build('commentanalyzer', 'v1alpha1', developerKey=API_KEY)
is timing out.Here is the error