Drakkar-Software / OctoBot

Open source crypto trading bot
https://www.octobot.cloud
GNU General Public License v3.0
3.32k stars 760 forks source link

Error after opening Commands #1294

Closed Feldi77 closed 4 years ago

Feldi77 commented 4 years ago

Step 1: Have you search for this issue before posting it?

Yes, but I don't found a matching issue.

Step 2: Describe your environment

Step 3: Describe the problem:

Running version 0.3.9 since a few days. Yesterday coinbase was set up as additional exchange. After I tried to restart it via commands, the bot crashed. The error also persists when the entries previously made are changed.

Actually, I was expecting a normal restart.

Steps to reproduce:

  1. Clean install
  2. Adding exchanges and strategies
  3. Restart

Relevant code exceptions or logs:

2020-08-21 05:35:53,830 ERROR OctoBot Launcher OctoBot Exception : argument of type 'NoneType' is not iterable Traceback (most recent call last): File "/home/pi/OctoBot/tools/commands.py", line 110, in start_bot await bot.initialize() File "/home/pi/OctoBot/core/octobot.py", line 68, in initialize await self.exchange_factory.create() File "/home/pi/OctoBot/core/exchange_factory.py", line 58, in create await self._create_exchange_traders(exchange_class_string) File "/home/pi/OctoBot/core/exchange_factory.py", line 79, in _create_exchange_traders await exchange_manager.initialize() File "/home/pi/OctoBot/tools/initializable.py", line 28, in initialize await self.initialize_impl() File "/home/pi/OctoBot/trading/exchanges/exchange_manager.py", line 63, in initialize_impl await self.create_exchanges() File "/home/pi/OctoBot/trading/exchanges/exchange_manager.py", line 88, in create_exchanges self._load_constants() File "/home/pi/OctoBot/trading/exchanges/exchange_manager.py", line 73, in _load_constants self._set_config_time_frame() File "/home/pi/OctoBot/trading/exchanges/exchange_manager.py", line 244, in _set_config_time_frame if self.time_frame_exists(time_frame.value): File "/home/pi/OctoBot/trading/exchanges/exchange_manager.py", line 259, in time_frame_exists return time_frame in self.client_time_frames[CONFIG_WILDCARD] TypeError: argument of type 'NoneType' is not iterable 2020-08-21 05:35:53,845 ERROR root File "start.py", line 295, in <module> main() File "start.py", line 291, in main start_octobot(args) File "start.py", line 199, in start_octobot asyncio.run(Commands.start_bot(bot, logger), debug=debug_mode) File "/usr/lib/python3.7/asyncio/runners.py", line 43, in run return loop.run_until_complete(main) File "/usr/lib/python3.7/asyncio/base_events.py", line 584, in run_until_complete return future.result() File "/home/pi/OctoBot/tools/commands.py", line 122, in start_bot raise e File "/home/pi/OctoBot/tools/commands.py", line 110, in start_bot await bot.initialize() File "/home/pi/OctoBot/core/octobot.py", line 68, in initialize await self.exchange_factory.create() File "/home/pi/OctoBot/core/exchange_factory.py", line 58, in create await self._create_exchange_traders(exchange_class_string) File "/home/pi/OctoBot/core/exchange_factory.py", line 79, in _create_exchange_traders await exchange_manager.initialize() File "/home/pi/OctoBot/tools/initializable.py", line 28, in initialize await self.initialize_impl() File "/home/pi/OctoBot/trading/exchanges/exchange_manager.py", line 63, in initialize_impl await self.create_exchanges() File "/home/pi/OctoBot/trading/exchanges/exchange_manager.py", line 88, in create_exchanges self._load_constants() File "/home/pi/OctoBot/trading/exchanges/exchange_manager.py", line 73, in _load_constants self._set_config_time_frame() File "/home/pi/OctoBot/trading/exchanges/exchange_manager.py", line 244, in _set_config_time_frame if self.time_frame_exists(time_frame.value): File "/home/pi/OctoBot/trading/exchanges/exchange_manager.py", line 259, in time_frame_exists return time_frame in self.client_time_frames[CONFIG_WILDCARD] NoneType: None 2020-08-21 05:35:53,846 ERROR root <class 'TypeError'>: argument of type 'NoneType' is not iterable NoneType: None

OctoBot.log

GuillaumeDSM commented 4 years ago

Your coinbase API Key is invalid "Error when initializing portfolio: GET https://api.pro.coinbase.com/accounts 401 Unauthorized {"message":"Invalid API Key"}.", this is the issue preventing OctoBot 0.3 from starting (it then tries to fetch data but can't because of the api key). On 0.4 the error is more explicit and is not making it crash but here with a valid API key, it should be fine.

Feldi77 commented 4 years ago

Actually there must always be an APIKEY and an APISECRET. This is probably because I only got one SECRET. I will test this again in the future.