Skip to content

Timeout errors with the CLI #162

@amelio-vazquez-reina

Description

@amelio-vazquez-reina

I am running into timeout errors when downloading data: (the resulting my_data.csv file is also empty). Why is it failing?

> qds.py --token=$QUBOLE_KEY_AVAZQUEZ hivecmd getresult 28091451 > my_data.csv

Traceback (most recent call last):
  File "/Users/amelio/anaconda/envs/py35/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 385, in _make_request
    httplib_response = conn.getresponse(buffering=True)
TypeError: getresponse() got an unexpected keyword argument 'buffering'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/amelio/anaconda/envs/py35/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 387, in _make_request
    httplib_response = conn.getresponse()
  File "/Users/amelio/anaconda/envs/py35/lib/python3.5/http/client.py", line 1174, in getresponse
    response.begin()
  File "/Users/amelio/anaconda/envs/py35/lib/python3.5/http/client.py", line 282, in begin
    version, status, reason = self._read_status()
  File "/Users/amelio/anaconda/envs/py35/lib/python3.5/http/client.py", line 243, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/Users/amelio/anaconda/envs/py35/lib/python3.5/socket.py", line 575, in readinto
    return self._sock.recv_into(b)
  File "/Users/amelio/anaconda/envs/py35/lib/python3.5/ssl.py", line 924, in recv_into
    return self.read(nbytes, buffer)
  File "/Users/amelio/anaconda/envs/py35/lib/python3.5/ssl.py", line 786, in read
    return self._sslobj.read(len, buffer)
  File "/Users/amelio/anaconda/envs/py35/lib/python3.5/ssl.py", line 570, in read
    v = self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/amelio/anaconda/envs/py35/lib/python3.5/site-packages/requests/adapters.py", line 403, in send
    timeout=timeout
  File "/Users/amelio/anaconda/envs/py35/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 623, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/Users/amelio/anaconda/envs/py35/lib/python3.5/site-packages/requests/packages/urllib3/util/retry.py", line 255, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/Users/amelio/anaconda/envs/py35/lib/python3.5/site-packages/requests/packages/urllib3/packages/six.py", line 310, in reraise
    raise value
  File "/Users/amelio/anaconda/envs/py35/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 578, in urlopen
    chunked=chunked)
  File "/Users/amelio/anaconda/envs/py35/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 389, in _make_request
    self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
  File "/Users/amelio/anaconda/envs/py35/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 314, in _raise_timeout
    raise ReadTimeoutError(self, url, "Read timed out. (read timeout=%s)" % timeout_value)
requests.packages.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='api.qubole.com', port=443): Read timed out. (read timeout=300)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/amelio/anaconda/envs/py35/bin/qds.py", line 603, in <module>
    sys.exit(main())
  File "/Users/amelio/anaconda/envs/py35/bin/qds.py", line 556, in main
    return cmdmain(a0, args)
  File "/Users/amelio/anaconda/envs/py35/bin/qds.py", line 194, in cmdmain
    return globals()[action + "action"](cmdclass, args)
  File "/Users/amelio/anaconda/envs/py35/bin/qds.py", line 160, in getresultaction
    return _getresult(cmdclass, cmd)
  File "/Users/amelio/anaconda/envs/py35/bin/qds.py", line 118, in _getresult
    cmd.get_results(sys.stdout, delim='\t')
  File "/Users/amelio/anaconda/envs/py35/lib/python3.5/site-packages/qds_sdk/commands.py", line 177, in get_results
    r = conn.get(result_path, {'inline': inline})
  File "/Users/amelio/anaconda/envs/py35/lib/python3.5/site-packages/qds_sdk/retry.py", line 22, in f_retry
    return f(*args, **kwargs)
  File "/Users/amelio/anaconda/envs/py35/lib/python3.5/site-packages/qds_sdk/connection.py", line 52, in get
    return self._api_call("GET", path, params=params)
  File "/Users/amelio/anaconda/envs/py35/lib/python3.5/site-packages/qds_sdk/connection.py", line 97, in _api_call
    return self._api_call_raw(req_type, path, data=data, params=params).json()
  File "/Users/amelio/anaconda/envs/py35/lib/python3.5/site-packages/qds_sdk/connection.py", line 83, in _api_call_raw
    r = x.get(url, timeout=300, **kwargs)
  File "/Users/amelio/anaconda/envs/py35/lib/python3.5/site-packages/requests/sessions.py", line 487, in get
    return self.request('GET', url, **kwargs)
  File "/Users/amelio/anaconda/envs/py35/lib/python3.5/site-packages/requests/sessions.py", line 475, in request
    resp = self.send(prep, **send_kwargs)
  File "/Users/amelio/anaconda/envs/py35/lib/python3.5/site-packages/requests/sessions.py", line 585, in send
    r = adapter.send(request, **kwargs)
  File "/Users/amelio/anaconda/envs/py35/lib/python3.5/site-packages/requests/adapters.py", line 479, in send
    raise ReadTimeout(e, request=request)
requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='api.qubole.com', port=443): Read timed out. (read timeout=300)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions