sock.settimeout(timeout) throws exception because timeout is a tuple
Opened this issue · 1 comments
Stevecaboose commented
After calling:
response = client.get('/me')
An exception is thrown because socket.py can only accept an integer as its timeout. I have seen some examples that set the timeout in the request object using a tuple. Did something change to the socket file that only accepts timeouts as an integer and no longer a tuple?
After I changed it to use a single integer, instead of a tuple, everything worked.
File "C:\Users\steven\AppData\Local\Programs\Python\Python38\lib\socket.py", line 793, in create_connection
sock.settimeout(timeout)
TypeError: an integer is required (got type tuple)
jaylinski commented
Vimeo uses the requests lib, which accepts tuples and integers:
https://2.python-requests.org/en/master/user/advanced/#timeouts
Maybe try the latest version, which adds Python 3 compatibility.