BitBotFactory / MikaLendingBot

Automated lending on Cryptocurrency exchanges Poloniex and Bitfinex
http://poloniexlendingbot.readthedocs.io/en/latest/index.html
MIT License
1.11k stars 344 forks source link

TypeError: argument of type 'NoneType' is not iterable #411

Closed JCBauza closed 6 years ago

JCBauza commented 7 years ago
Welcome to Poloniex Lending Bot
2017-06-27 04:21:23 Error: argument of type 'NoneType' is not iterable Requesting returnAvailableAccountBalances
Traceback (most recent call last):
  File "/home/.../poloniexlendingbot/lendingbot.py", line 78, in <module>
    Lending.cancel_all()
  File "/home/.../poloniexlendingbot/modules/Lending.py", line 177, in cancel_all
    available_balances = api.return_available_account_balances('lending')
  File "/home/.../poloniexlendingbot/modules/Poloniex.py", line 168, in return_available_account_balances
    balances = self.api_query('returnAvailableAccountBalances', {"account": account})
  File "/home/.../poloniexlendingbot/modules/Poloniex.py", line 43, in new_method
    return method(self, *arg, **kws)
  File "/home/.../poloniexlendingbot/modules/Poloniex.py", line 125, in api_query
    json_ret = _read_response(ret)
  File "/home/.../poloniexlendingbot/modules/Poloniex.py", line 90, in _read_response
    if 'error' in data:
TypeError: argument of type 'NoneType' is not iterable
Unhandled error, please open a Github issue so we can fix it!
JCBauza commented 7 years ago

To replicate the issue, set the currencies to analyze to ACTIVE and that's where it fails based on where the error is being generated. I changed it to ALL and it hasn't immediately failed. I'll continue to monitor and report back if there is anything to add. Thanks!

mchl18 commented 7 years ago

do you mean this?

#Local Market Analysis: Choose which coins to record the market of in order to analyse them and compute a recommended lending rate.
#Enter ALL to analyse all coins, enter ACTIVE to analyse the markets of any coins you have in your lending account when the bot starts, these can be mixed.
analyseCurrencies = ACTIVE

i just tried but couldn't reproduce did you have any coins in you lending account?

can you include the config WITHOUT API key and secret

edit: i also couldn't reproduce with no coins in lending, it just show me the coin already lent. did you have coins lent?

JCBauza commented 7 years ago

It works now... not sure what happened. I always have some sort of balance in the account so if it happens again I'll add more details.

Evanito commented 6 years ago

Might have just needed some time to get what you had in your account. Comment again if it happens again.

no-response[bot] commented 6 years ago

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please comment here if you have or find the answers we need so that we can investigate further.