whittlem / pycryptobot

Python Crypto Bot (PyCryptoBot)
Apache License 2.0
1.96k stars 736 forks source link

TypeError("'>' not supported between instances of 'NoneType' and 'int'") #791

Closed FirstonTheBlock closed 1 year ago

FirstonTheBlock commented 1 year ago

As requested by Michael on TG

Apologies in advance if I haven't posted this correctly.

Been running bot version 7.0.36 with no issues on Win10. Python version 3.9.7 I'm a total noob and run the bot from the folder on my desktop, using a .bat file to start the bot, everything working perfectly.

Downloaded version 8.0.5 copied the config.json and kucoin.key files across and get the following error on startup

Bot1 2023-04-16 22:46:52 BTC-GBP 900 TypeError("'>' not supported between instances of 'NoneType' and 'int'")

Config file below.

{ "kucoin": { "api_url": "https://api.kucoin.com", "api_key_file": "kucoin.key", "config": { "autorestart": 1, "base_currency": "ADA", "disablebuynearhigh": 1, "enableinsufficientfundslogging": 1, "enabletelegrambotcontrol": 1, "granularity": "5m", "live": 1, "buylastsellsize": 1, "buymaxsize": 19, "nobuynearhighpcnt": 1, "predictions": 1, "quote_currency": "USDT", "sellatresistance": 1, "selllowerpcnt": -12, "telegram": 1, "telegrambotcontrol": 1, "nosellmaxpcnt": 3, "nosellminpcnt": -9, "disablebuymacd": 0, "disablebuyema": 0, "disablebuyobv": 1, "bbands_s1": 0, "trailingbuypcnt": 0.5, "trailingsellpcnt": -0.5, "trailingstoploss": -1, "trailingstoplosstrigger": 2, "stats": 0, "verbose": 0, "graphs": 1, "log": 1, "websocket": 0 } }, "telegram": { "token": "REMOVED", "user_id": "REMOVED", "client_id": "REMOVED", "datafolder": "" }, "scanner": { "atr72_pcnt": 1.0, "exitaftersell": 0, "enableleverage": 0, "use_default_scanner": 1, "maxbotcount": 5, "autoscandelay": 0, "enable_buy_next": 1 } }

whittlem commented 1 year ago

I see what the problem is. It's not auto detecting the KuCoin exchange. If you add "--exchange kucoin" it works. I'll track down the issue and fix it this evening.

Nicolas469 commented 1 year ago

Same problem with binance. If you use docker, add "--exchange kucoin" to your docker run and if you use docker-compose, use "command": "--exchange kucoin".

whittlem commented 1 year ago

Fixed in 8.0.6