Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monitor hangs when API is unreachable #24

Open
mammuth opened this issue Dec 17, 2017 · 0 comments
Open

Monitor hangs when API is unreachable #24

mammuth opened this issue Dec 17, 2017 · 0 comments
Labels

Comments

@mammuth
Copy link
Owner

mammuth commented Dec 17, 2017

Bitfinex API is unreachable currently.
Probably would be a smaller problem, if each update process would be async itself (see #23).

Traceback (most recent call last):
  File "/home/max/.virtualenvs/bitcoin-arbitrage-5sdT_1ZK/lib/python3.6/site-packages/urllib3/connectionpool.py", line 380, 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 "/usr/lib64/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib64/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/max/Code/bitcoin-arbitrage/bitcoin_arbitrage/__main__.py", line 9, in <module>
    monitor.start()  # ToDo: This call should not be blocking
  File "/home/max/Code/bitcoin-arbitrage/bitcoin_arbitrage/monitor.py", line 29, in start
    self._update_task_loop.run_until_complete(self._update_task)
  File "/usr/lib64/python3.6/asyncio/base_events.py", line 454, in run_until_complete
    self.run_forever()
  File "/usr/lib64/python3.6/asyncio/base_events.py", line 421, in run_forever
    self._run_once()
  File "/usr/lib64/python3.6/asyncio/base_events.py", line 1426, in _run_once
    handle._run()
  File "/usr/lib64/python3.6/asyncio/events.py", line 127, in _run
    self._callback(*self._args)
  File "/home/max/Code/bitcoin-arbitrage/bitcoin_arbitrage/monitor.py", line 42, in _update
    exchange.update_prices()
  File "/home/max/Code/bitcoin-arbitrage/bitcoin_arbitrage/exchange/bitfinex.py", line 20, in update_prices
    response = requests.get(url)
  File "/home/max/.virtualenvs/bitcoin-arbitrage-5sdT_1ZK/lib/python3.6/site-packages/requests/api.py", line 72, in get
    return request('get', url, params=params, **kwargs)
  File "/home/max/.virtualenvs/bitcoin-arbitrage-5sdT_1ZK/lib/python3.6/site-packages/requests/api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "/home/max/.virtualenvs/bitcoin-arbitrage-5sdT_1ZK/lib/python3.6/site-packages/requests/sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "/home/max/.virtualenvs/bitcoin-arbitrage-5sdT_1ZK/lib/python3.6/site-packages/requests/sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "/home/max/.virtualenvs/bitcoin-arbitrage-5sdT_1ZK/lib/python3.6/site-packages/requests/adapters.py", line 440, in send
    timeout=timeout
  File "/home/max/.virtualenvs/bitcoin-arbitrage-5sdT_1ZK/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen
    chunked=chunked)
  File "/home/max/.virtualenvs/bitcoin-arbitrage-5sdT_1ZK/lib/python3.6/site-packages/urllib3/connectionpool.py", line 383, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/lib64/python3.6/http/client.py", line 1331, in getresponse
    response.begin()
  File "/usr/lib64/python3.6/http/client.py", line 297, in begin
    version, status, reason = self._read_status()
  File "/usr/lib64/python3.6/http/client.py", line 258, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/lib64/python3.6/socket.py", line 586, in readinto
    return self._sock.recv_into(b)
  File "/usr/lib64/python3.6/ssl.py", line 1009, in recv_into
    return self.read(nbytes, buffer)
  File "/usr/lib64/python3.6/ssl.py", line 871, in read
    return self._sslobj.read(len, buffer)
  File "/usr/lib64/python3.6/ssl.py", line 631, in read
    v = self._sslobj.read(len, buffer)
KeyboardInterrupt
@mammuth mammuth added the bug label Dec 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant