Skip to content
This repository has been archived by the owner on Feb 1, 2019. It is now read-only.

Does not function after time due to RSA keys? #26

Open
olifog opened this issue Jun 13, 2018 · 0 comments
Open

Does not function after time due to RSA keys? #26

olifog opened this issue Jun 13, 2018 · 0 comments

Comments

@olifog
Copy link

olifog commented Jun 13, 2018

Hey- I've been using this library recently to build a trading bot, and I finished it last night. I left it running until this morning, only to realise that it wasn't accepting trades, with a bunch of errors in console. I'm not entirely sure what's wrong...
Thanks so much!

Here's the output:

Trade Manager is logged in
Task exception was never retrieved
future: <Task finished coro=<GlobalManager._run_forever() done, defined at /usr/local/lib/python3.6/site-packages/pytrade/__init__.py:16> exception=ValueError('Unable to obtain rsa keys',)>
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/pytrade/confirmations.py", line 94, in get_confirmations
    async with self.session.get(self.CONF_URL + '/conf?' + urlencode(params), headers=headers) as resp:
  File "/usr/local/lib/python3.6/site-packages/aiohttp/client.py", line 784, in __aenter__
    self._resp = await self._coro
  File "/usr/local/lib/python3.6/site-packages/aiohttp/client.py", line 396, in _request
    'Can redirect only to http or https')
ValueError: Can redirect only to http or https

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/pytrade/login.py", line 59, in _get_rsa
    mod = int(resp['publickey_mod'], 16)
KeyError: 'publickey_mod'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/pytrade/login.py", line 59, in _get_rsa
    mod = int(resp['publickey_mod'], 16)
KeyError: 'publickey_mod'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/pytrade/login.py", line 59, in _get_rsa
    mod = int(resp['publickey_mod'], 16)
KeyError: 'publickey_mod'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/pytrade/login.py", line 59, in _get_rsa
    mod = int(resp['publickey_mod'], 16)
KeyError: 'publickey_mod'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/pytrade/login.py", line 59, in _get_rsa
    mod = int(resp['publickey_mod'], 16)
KeyError: 'publickey_mod'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/pytrade/login.py", line 59, in _get_rsa
    mod = int(resp['publickey_mod'], 16)
KeyError: 'publickey_mod'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/pytrade/login.py", line 59, in _get_rsa
    mod = int(resp['publickey_mod'], 16)
KeyError: 'publickey_mod'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/pytrade/login.py", line 59, in _get_rsa
    mod = int(resp['publickey_mod'], 16)
KeyError: 'publickey_mod'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/pytrade/login.py", line 59, in _get_rsa
    mod = int(resp['publickey_mod'], 16)
KeyError: 'publickey_mod'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/pytrade/login.py", line 59, in _get_rsa
    mod = int(resp['publickey_mod'], 16)
KeyError: 'publickey_mod'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/pytrade/login.py", line 59, in _get_rsa
    mod = int(resp['publickey_mod'], 16)
KeyError: 'publickey_mod'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/pytrade/__init__.py", line 20, in _run_forever
    await zwork.poll()
  File "/usr/local/lib/python3.6/site-packages/pytrade/manager_trade.py", line 91, in poll
    await self._confirmation_poll()
  File "/usr/local/lib/python3.6/site-packages/pytrade/manager_trade.py", line 174, in _confirmation_poll
    confs = await self.get_confirmations()
  File "/usr/local/lib/python3.6/site-packages/pytrade/confirmations.py", line 102, in get_confirmations
    await self.login(self.async_client)
  File "/usr/local/lib/python3.6/site-packages/pytrade/manager_trade.py", line 79, in login
    session = await async_client.do_login()
  File "/usr/local/lib/python3.6/site-packages/pytrade/login.py", line 30, in do_login
    login_request = await self._send_login()
  File "/usr/local/lib/python3.6/site-packages/pytrade/login.py", line 73, in _send_login
    rsa_keys = await self._get_rsa()
  File "/usr/local/lib/python3.6/site-packages/pytrade/login.py", line 67, in _get_rsa
    return await self._get_rsa()
  File "/usr/local/lib/python3.6/site-packages/pytrade/login.py", line 67, in _get_rsa
    return await self._get_rsa()
  File "/usr/local/lib/python3.6/site-packages/pytrade/login.py", line 67, in _get_rsa
    return await self._get_rsa()
  [Previous line repeated 6 more times]
  File "/usr/local/lib/python3.6/site-packages/pytrade/login.py", line 64, in _get_rsa
    raise ValueError("Unable to obtain rsa keys")
ValueError: Unable to obtain rsa keys
^CTraceback (most recent call last):
  File "bot.py", line 157, in <module>
    global_manager.run_forever()
  File "/usr/local/lib/python3.6/site-packages/pytrade/__init__.py", line 27, in run_forever
    loop.run_forever()
  File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 422, in run_forever
    self._run_once()
  File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/asyncio/base_events.py", line 1396, in _run_once
    event_list = self._selector.select(timeout)
  File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/selectors.py", line 577, in select
    kev_list = self._kqueue.control(None, max_ev, timeout)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant